Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > xsl:copy-of question

Reply
Thread Tools

xsl:copy-of question

 
 
David Shen
Guest
Posts: n/a
 
      09-06-2003
I would like to copy the entire tree. However, it only copy the text.

The xml file is the following:
<?xml version="1.0"?>
<hello>
Hello there, world!
<AAA>valueA</AAA>
</hello>

The xsl file is the following:
<xsl:stylesheet xmlnssl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xslutput encoding="UTF-16" method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

The result is
Hello there, world! valueA

I would like to get
<hello>
Hello there, world!
<AAA>valueA</AAA>
</hello>

Thanks

David
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      09-06-2003
Most probably you are viewing the result with a browser.

When viewed with a normal text editor the result is an exact copy of the
source xml document.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


"David Shen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I would like to copy the entire tree. However, it only copy the text.
>
> The xml file is the following:
> <?xml version="1.0"?>
> <hello>
> Hello there, world!
> <AAA>valueA</AAA>
> </hello>
>
> The xsl file is the following:
> <xsl:stylesheet xmlnssl="http://www.w3.org/1999/XSL/Transform"

version="1.0">
> <xslutput encoding="UTF-16" method="xml" indent="yes"/>
> <xsl:template match="/">
> <xsl:copy-of select="."/>
> </xsl:template>
> </xsl:stylesheet>
>
> The result is
> Hello there, world! valueA
>
> I would like to get
> <hello>
> Hello there, world!
> <AAA>valueA</AAA>
> </hello>
>
> Thanks
>
> David



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments