Hello,
I have this XML code:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<doc:iso_10303_28 xmlns:exp="urn:oid:1.0.10303.28.2.1.1" xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oid:1.0.10303.28.2.1.1 ex.xsd" version="2.0">
<exp:uos id="uos_1" description="" configuration="default" edo="">
<GE_PART210>
<document_list>
<document id="DOC1" >
<id>DOC1</id>
<revision>-</revision>
<description>SHEET</description>
<eco>
<effectivity>
<effdate/>
<changeNum/>
</effectivity>
</eco>
<oda>81343</oda>
<org></org>
</document>
<document id="DOC2">
<id>DOC2 </id>
<revision>S9 </revision>
<description>FASTE</description>
<eco>
<effectivity>
<effdate>1995-09-15 01:00:00.0</effdate>
<changeNum>078254</changeNum>
</effectivity>
</eco>
<oda>07482</oda>
<org>CM</org>
</document>
</document_list>
</GE_PART210>
and this xslt code
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:doc="urn:oid:1.0.10303.28.2.1.3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
exclude-result-prefixes="msxsl exp doc xsi"
>
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="GE_PART210">
<xsl:element name="GE_PART210">
<xsl:text>
</xsl:text>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="document_list">
<xsl:element name="document-list">
<xsl:text>
</xsl:text>
<xsl:apply-templates />
</xsl:element>
</xsl:template>
<xsl:template match="document">
<xsl:element name="document">
<xsl:attribute name="id">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:attribute name="revision">
<xsl:value-of select="revision"/>
</xsl:attribute>
<xsl:text>
</xsl:text>
<xsl:copy-of select="description"/>
<xsl:text>
</xsl:text>
<xsl:element name="eco">
<xsl:attribute name="effdate">
<xsl:value-of select="effdate"/>
</xsl:attribute>
<xsl:value-of select="changeNum"/>
</xsl:element>
<xsl:text>
</xsl:text>
<xsl:copy-of select="oda"/>
<xsl:text>
</xsl:text>
<xsl:copy-of select="org"/>
<xsl:text>
</xsl:text>
</xsl:element>
</xsl:template>
<xsl:template match="document/id"/>
</xsl:stylesheet>
and I get this out put
Code:
GE_PART210>
<document-list>
<document id="DOC1" revision="-">
<description xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">SHEET</description>
<eco effdate=""/>
<oda xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">81343</oda>
<org xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</document>
<document id="DOC2" revision="S9 ">
<description xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">FASTE</description>
<eco effdate=""/>
<oda xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">07482</oda>
<org xmlns:doc="urn:oid:1.0.10303.28.2.1.3" xmlns:exp="urn:oid:1.0.10303.28.2.1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">CM</org>
</document>
</document-list>
</GE_PART210>
I thought if I use the
Code:
exclude-result-prefixes="msxsl exp doc xsi"
the namespaces in the output will be excluded, so how is it that I'm still getting them? I have tried this with VS2010 and EditiX 2010 both give me the same output
regards,
ehsan