xsl:namespace-alias Element

The <xsl:namespace-alias> element replaces the prefix associated with a given name space with another prefix.

<xsl:namespace-alias
  stylesheet-prefix = QName
  result-prefix = QName/>

Attributes

None.

Element Information

Number of occurrences Unlimited
Parent elements xsl:stylesheet
Child elements None

Remarks

Sometimes the content that an XSL Transformations (XSLT) file generates is other XSLT. This presents a challenge with name spaces because there is no explicit way to declare two prefixes with the same name space without the processor treating both prefixes as the same name space and acting on them. With the name space-alias command, you can**assign an interim name space to an alternate prefix, apply the style sheet, and then map the alternate name space to the XSLT one.

Although XSL-to-XSL file generation is the primary use for this command, it is not the only one. You can use this technique anywhere you have colliding name spaces (for example, with the xsi: schema data type name space). The top-level element must be <xsl:namespace-alias>.

See Also

XSLT Elements | xsl:import Element | xsl:include Element

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.