[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "*|@*|text()" vs. "node()"
> instead of <xsl:apply-templates select="*|@*|text()"/>, I think you just > want <xsl:apply-templates> otherwise, you're applying the templates to the > children of whatever matches the template first and not getting the original > match. You have that (at best) backwards. <xsl:apply-templates/> just matches on children (not the current node, and not attributes). <xsl:apply-templates select="*|@*|text()"/> matches on child elements and text nodes, but not comments or pi's and also matches on attributes. > Also, I think that it's going to match everything so all the > children 3 levels nested and below are going to be repeated. No. > As far as the attribute, I don't believe you can have <xsl:choose> > as a child of <xsl:attribute>. Yes you can, why would you think not? > Also, you can't have <xsl:attribute> without an opening > element before it.. That is immediate from the structure of XML. the xsl:template element opens before xsl:attribute. there's nothing wrong with <xsl:template match="@href"> <xsl:attribute name="href"> > Also, I don't know if it would make a difference, but > try <xsl:template match="*/@href"> instead of simply match="href" You meant "@href" not "href". It does make a difference: it affects the default priority, but it doesn't affect the nodes matched. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. 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
|