[Home]  [List]  [News]  [Docs]  [FAQ]  [Downloads]  [Resources]  [About]
Search :
/Home /List

list4xt : Mailing list for the XT users community.

[list4xt] Re: XSLT with a source with namespaces

Subject: [list4xt] Re: XSLT with a source with namespaces

User: Website

From: Stephanie Martin - Contractor (SMartin@agchem.com)
Date: 30/06/2000 - 18:49


Scratch that last question. I had a small mistype in the namespace path.
It only works if the namespace URI in the source matches exactly with the
namespace URI I put in my XSLT stylesheet. However, this seems to be a small
problem in itself. If the party generating the source for me changes their
namespace URI's, then my stuff will break because the URIs won't match
anymore. Comments?

Anyway, my transformation is working except I'm seeing a few anomolies in
the output. Namely, in one of my templates I say:

<?xml version="1.0"?>
 
<xsl:stylesheet
 xmlns:xsl="<http://www.w3.org/1999/XSL/Transform>"
 version="1.0"
 xmlns:xt="<http://www.jclark.com/xt>"
 extension-element-prefixes="xt"
 xmlns:n1="x-schema:schema/schema-n1.xml"
 xmlns:n2="x-schema:schema/schema-n2.xml"
 xmlns:n3="x-schema:schema/schema-n3.xml"
>
...
<xsl:template match="n1:document">
  <n1_ourversion
         xmlns="x-schema:schema/n1_ourversion.xml"
         xmlns:n2_ourversion="x-schema:schema/n2_ourversion.xml"
         xmlns:n3_ourversion="x-schema:schema/n3_ourversion.xml"
>
  ...
  </n1_ourversion>
</xsl:template>
...
  
but the actual output is this:

...
<n1_ourversion
        xmlns:n1="x-schema:schema/n1.xml"
        xmlns:n2="x-schema:schema/n2.xml"
        xmlns:n3="x-schema:schema/n3.xml"
        xmlns="x-schema:schema/n1_ourversion.xml"
         xmlns:n2_ourversion="x-schema:schema/n2_ourversion.xml"
         xmlns:n3_ourversion="x-schema:schema/n3_ourversion.xml"
>
  ...
</n1_ourversion>
...

The namespaces I added to the <xsl:stylesheet> element in my stylesheet are
automatically getting inserted here and I don't know why. There are a
couple other occurances of this type of odd thing with the namespace output.
Why is this happening?

Stephanie Martin
AgChem Equiptment Co., Inc.
smartin@agchem.com
952-945-2390 x226

--
Mailing list for the XT users community.     (http://midtnreconnect.org)
(mailto:list4xt-request@4xt.org?Subject=unsubscribe to unsubscribe)



Archive générée par hypermail 2b28 le 06/11/2001 - 11:46 CET

webmaster@4xt.org