[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Adding *xmlns* attribute dynamically

Subject: RE: Adding *xmlns* attribute dynamically
From: "Gabriel Osorio" <gosorio@xxxxxxxxxxx>
Date: Fri, 12 Jan 2007 10:33:22 -0500
xml to xml adding xmlns
http://www.dpawson.co.uk/xsl/sect2/N5536.html


-----Original Message-----
From: Kishore Bankupelle [mailto:brkkis@xxxxxxxxx] 
Sent: Friday, January 12, 2007 5:40 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Adding *xmlns* attribute dynamically

Hi,

I am new to XSL and writing a XSL to transform list of XSDs to another list
of XSD.

The issue is, i want to assign a dynamic value for "xmlns" attribute in
<xs:schema>. From the mailing archieves i see that i cannot add "xmlns" as
an attribute. If i try below

*<xs:schema>
    <xsl:attribute name="xmlns">
       <xsl:value-of select="$ReqResName" />
  </xsl:attribute>
</xs:schema>
*
where "ReqResName" is a variable(<xsl:variable>), i am getting the below
error.

*Illegal value used for attribute name: name*

I believe this is because of adding "xmlns" as an attribute. If you add the
attribute "xmlns" directly to the tag, you cant change the attribute value
dynamically. So,

*<xs:schema version="1.0" xmlns="????????">some child elemnsts</xs:schema>*

The above example does not give you a way to change the value represented by
"??????" dynamically. I mean to say we cant access any XSL variable in the
place of "????????".

So if i want to change the value of "xmlns" attribute in "<xs:schema>", what
is the solution?

Thanks in advance.

Regards,
Kishore

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.