Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2011, 07:07 AM
Authorized User
 
Join Date: Oct 2011
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Default Help with missing attributes

Hi,

I have the following text in my transform code:

<SOAP-ENV:Header>
<ns:FXTradeVersion xmlns:xs="http://www.w3.org/2001/XMLSchema" ns0:mustUnderstand="1" xsi:type="xs:string"



however, in my output xml I have the following

- <SOAP-ENV:Header>
<ns:FXTradeVersion ns0:mustUnderstand="1" xsi:type="xs:string"


the xmlns:xs="http://www.w3.org/2001/XMLSchema" is missing.....

Now i do have other namespaces and addresses in the output xml and they all are present, it is just this one that isn't...
anyone got any ideas
thanks

A
 
Old November 21st, 2011, 07:15 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

If you don't show us your code then we can't tell you where it's wrong.

Unused namespaces are copied from the input to the output when you use xsl:copy or xsl:copy-of. They aren't copied if you do xsl:element name="{name()}".
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old November 21st, 2011, 07:27 AM
Authorized User
 
Join Date: Oct 2011
Posts: 30
Thanks: 2
Thanked 0 Times in 0 Posts
Default

This is my code

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
<SOAP-ENV:Header>
<ns:FXTradeVersion xmlns:xs="http://www.w3.org/2001/XMLSchema" ns0:mustUnderstand="1" xsi:type="xs:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://schemas.westpac.com.au/wib/icc/fx/service/tradenotification-1-0" >1.0</ns:FXTradeVersion>
</SOAP-ENV:Header>



- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
- <SOAP-ENV:Header>
<ns:FXTradeVersion ns0:mustUnderstand="1" xsi:type="xs:string" xmlns:ns="http://schemas.westpac.com.au/wib/icc/fx/service/tradenotification-1-0" xmlns:ns0="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1.0</ns:FXTradeVersion>
</SOAP-ENV:Header>



..............................

And this is the output
 
Old November 21st, 2011, 08:11 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I see no XSLT code here.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
Attributes smfarooq C# 4.0 aka C# 2010 General Discussion 1 October 21st, 2011 04:38 PM
Display HTML Attributes from XML Attributes rangeshram XSLT 3 March 27th, 2010 01:14 PM
Attributes Use determined by value? bonekrusher XML 2 November 18th, 2006 07:36 PM
restrictions on attributes kfir XML 2 May 30th, 2006 04:35 AM
Elements and attributes Morrislgn XSLT 1 June 20th, 2005 11:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.