Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Getting Namespaces into a Transform

From: Jeni Tennison <jeni@------------.--->
To: "Jim Stanley" <JimS@--------------.--->
Date: 11/16/2004 5:04:00 PM
Hi Jim,

> So there are several attributes to the root besides the namespace
> declaration. Since I declare the root element programatically, what
> do I need to do to stick literals in there?

The namespace declaration will be added automatically if you add an
attribute that uses that namespace declaration to the element. So if
you do:

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<xsl:template match="root">
  <xsl:element name="root">
    ...
    <xsl:attribute name="xsi:noNamespaceSchemaLocation">
      <xsl:text>NewPPSSchema.xsd</xsl:text>
    </xsl:attribute>
    ...
  </xsl:element>
  ...
</xsl:template>
...
</xsl:stylesheet>

you should get the xsi:noNamespaceSchemaLocation attribute you want,
plus the namespace declaration that it needs.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


From mike@s... Tue Nov 16 18:42:43 2004
Received: from lisa.w3


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent