XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] 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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS