Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: How do I prevent the tranform from moving namespaces?

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 5/20/2008 2:22:00 PM

Greg Collins wrote:

> So for example, I have:
> 
> <xsl:template name="foo">
>  <pkg:part pkg:name="/docProps/custom.xml" 
> pkg:contentType="application/vnd.openxmlformats-officedocument.custom-properties+xml" 
> pkg:padding="256">
>   <pkg:xmlData>
>    <Properties 
> xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties" 
> xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"> 
> 
>     <property fmtid="{{D5CDD505-2E9C-101B-9397-08002B2CF9AE}}" pid="2" 
> name="Customer">
>      <vt:lpwstr>
>       <xsl:value-of select="/my:myFields/my:Project"/>
>      </vt:lpwstr>
>     </property>
>    </Properties>
>   </pkg:xmlData>
>  </pkg:part>
> </xsl:template>
> 
> 
> But what I get out of it is:
> 
> <pkg:part pkg:name="/docProps/custom.xml" 
> pkg:contentType="application/vnd.openxmlformats-officedocument.custom-properties+xml" 
> pkg:padding="256">
>  <pkg:xmlData>
>   <Properties 
> xmlns="http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"> 
> 
>    <property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="2" 
> name="Customer" xmlns="">
                   ^^^^^^^^

I kind of doubt that the above template creates this output but if it 
does then there is a bug in the XSLT processor or XML parser you use.
But an xmlns="" usually indicates that there is a problem in the 
stylesheet and not with the XSLT processor.
Can you post a minimal but complete XML input and XSLT stylesheet and 
tell us which XSLT processor you use?



-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


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