|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Question about xPath i template match?
I have a xml-file look like this
Code:
<pages><page id="p1"> ... content </page> <page id="p2"> ... other content </page> </pages> is it possible to match a xsl:template to one on these pages based on the id property?? I've tried Code:
<xsl:template match="//pages/page[@id = 'p1']"> Is this possible to fix somehow?? |
|
#2
|
|||
|
|||
|
//page[@id='p1'] works. Long version: /descendant-or-self::node()/child::page[(attribute::id = "p1")]
I recommend XPath Explorer for testing stuff like this. It's free. http://www.purpletech.com/xpe/index.jsp |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Question about xPath i template match? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|