xsl-list
[Top] [All Lists]

RE: Root element attributes

2005-11-04 04:58:34
Hi,

my input xml as:

<sample xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:noNamespaceSchemaLocation="Test1.xsd">
<sample1>
<p>ABCDEFGHIJKLMNOP<p>
</sample1>
</sample>

Output should be:

<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:noNamespaceSchemaLocation="Test1.xsd">
<sample1>
<p>ABCDEFGHIJKLMNOP<p>
</sample1>
<test>

Thanks,
Shailesh

-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk] 
Sent: Friday, November 04, 2005 5:18 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Root element attributes


which bit did are you having problems with?
a stylesheet with the single template

<xsl:template match="Sample">
<test
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:noNamespaceSchemaLocation="Test1.xsd"/>
</xsl:template>

appears to produce the result you want.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
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>