xsl-list
[Top] [All Lists]

RE: [xsl] Adding Multiple namespaces

2008-05-07 23:31:36
Namespaces declared on xsl:stylesheet are copied to the result when you use
a literal result element, but not when you use xsl:copy. So xsl:namespace is
probably the best way to do it.

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Pankaj Chaturvedi [mailto:pankaj(_dot_)chaturvedi(_at_)idsil(_dot_)com] 
Sent: 08 May 2008 06:57
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Adding Multiple namespaces

Correction its aid5

<xsl:stylesheet version="2.0"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/";
xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>


-----Original Message-----
From: Pankaj Chaturvedi [mailto:pankaj(_dot_)chaturvedi(_at_)idsil(_dot_)com]
Sent: Thursday, May 08, 2008 11:04 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Adding Multiple namespaces


Hi,


Can somebody suggest me how can I add multiple namespaces to 
my root element. As of now I am adding namespace to root 
element as below.



<xsl:stylesheet version="2.0"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

      <xsl:template match="root">
      <xsl:copy>
          <xsl:namespace name="aid5"
select="'http://ns.adobe.com/AdobeInDesign/5.0/'"/>
      <xsl:copy-of select="@*"/>
      <xsl:apply-templates/>
      </xsl:copy>
      </xsl:template>


This works fine but I would prefer to add in 
<xsl:stylesheet>. I've tried the below code, but it gives 
some odd results.


<xsl:stylesheet version="2.0"
xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/";
xmlns:xsl="http://ns.adobe.com/AdobeInDesign/5.0/";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>




Best,

Pankaj Chaturvedi

==============================================================
==============
================


Confidentiality Notice:" This message and any attachment(s) 
contained here are information that is confidential, 
proprietary to IDS Infotech Ltd. and its customers.
Contents may be privileged or otherwise protected by law. The 
information is solely intended for the individual or the 
entity it is addressed to. If you are not the intended 
recipient of this message, you are not authorized to read, 
forward, print, retain, copy or disseminate this message or 
any part of it. If you have received this e-mail in error, 
please notify the sender immediately by return e-mail and 
delete it from your computer."

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>