[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: How to get XPath in a XSLT shylesheet
> although actually along a sibling axis you have quite hard to > "accidentally" get multiple prefixes. Not really. You just have to do something like this: <xsl:template match="vc:changes" xmlns:vc="http://acme.com/ns/version-control"> <vc:changes> <xsl:copy-of select="*"/> <vc:change date="{current-date()}">Changed by stylesheet XYZ</vc:change> </vc:changes> </xsl:template> Existing elements will retain the prefix in the original document, the new element will have the prefix used by the stylesheet author. Once you get two sub-communities who prefer different prefixes (as with "xs" and "xsd") you're going to end up with documents that mix the two. Michael Kay http://www.saxonica.com/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|