|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Matching text nodes
| <xsl:template match="text()" > | | nothing is matched, but when i do this in this way | ( AFAIK this does the same ) | | <xsl:template match="*/text()" > | | evrything is ok, i can understand why second works , but why first not ? | | FYI i'm using Oracle 2.0.9 parser in W2k.. Hard to say without seeing the rest of your stylesheet's templates, but I'm going to guess that you have the following situation going on... You probably have: <xsl:template match="text()"> then later in the stylesheet: <xsl:template match="node()|@*"> with an identity transformation template. Since match="text()" has the same priority as match="node()", and since both text() and node() match a text node, the match="node()" will fire instead of the match="text()" since it occurs later in document order in the stylesheet. By your changing the match pattern to match="*/text()" this becomes more specific than match="node()" so this causes your match="*/text()" rule to "get noticed" by the XSLT engine where it previously was being ignored. The solution is to change your template to have an explicit priority like this: <xsl:template match="text()" priority="2"> which makes it take priority over the match="node()" template. ______________________________________________________________ Steve Muench, Lead XML Evangelist & Consulting Product Manager BC4J & XSQL Servlet Development Teams, Oracle Rep to XSL WG Author "Building Oracle XML Applications", O'Reilly http://www.oreilly.com/catalog/orxmlapp/ 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








