|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath question
> <div type="introduction"> > <head>Introduction</head> > <pb/> > > <div type="partie"> > <p>Test > </p> > <pb/> > </div> > > </div> > > <xsl:template div[@type='introduction']"> > <xsl:for-each select="./*/pb"> > Find pb > </xsl:for-each> > </xsl:template> > > Why xt find only one pb. Because there is only one <pb> element that is a grandchild of <div type="introduction">, the other one is an immediate child. If you want to find all descendant <pb> elements, write <xsl:for-each select="descendant::pb">, or ".//pb" (which means the same thing unless there are positional predicates). If you want to find children and grandchildren, write "pb | */pb". Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








