[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Michael Kay" <mike@s...>
  • To: "'David Carlisle'" <davidc@n...>
  • Date: Tue, 9 Jan 2007 11:44:46 -0000

> 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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member