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

<param> tag in input document breaks <xsl:copy-of sel

Subject: <param> tag in input document breaks <xsl:copy-of select="." />
From: Evgeny Turnaev <turnaev.e@xxxxxxxxx>
Date: Wed, 3 Jul 2013 12:44:33 +0400
 <param> tag in input document breaks <xsl:copy-of  sel
Hello.
  Dear All, i have searched the web and this mail list and found
nothing related to my question.
  Sorry if this is something obvious and mentioned in xml standard but
this really looks strange to me.

The Question:

Given this input document:
<?xml version="1.0" encoding="UTF-8" ?>
<param>
<sometag>Hello world</sometag>
</param>

And this simple stylesheet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html"/>

<xsl:template match="/">
    <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>

The output is:
<param>

While i expect output:
<param>
<sometag>Hello world</sometag>
</param>

However changing <param> tag in input document to some other tag fixes
problem and output match expectations.
Also changing <xsl:output method="html"/> to <xsl:output
method="xml"/> fixes problem, but i really want to keep <xsl:output
method="html"/>.
I have stumbled this while making transform on xml-rpc output: it
starts with <methodResponse><params><param> and all the contents of
<param> tag is missing in output.
Is there something special about <param> tag in input document? I
suppose input document tags should not anyhow change result of
<xsl:copy-of select="." />, is'nt it?

Some technical info:
Transformation code was taken literally as copy of example from page:
http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html
(
and then
gcc ./libxslt_tutorial.c -o ./test_xslt -I/usr/include/libxml2 -lxml2 -lxslt
./test_xslt output.xsl xml_rpc.xml
)
System: ubuntu 12.04
Linux mtnp 3.2.0-36-generic #57-Ubuntu SMP Tue Jan 8 21:44:52 UTC 2013
x86_64 x86_64 x86_64 GNU/Linux

libxml & libxslt installed via apt-get
Package: libxml2
Priority: standard
Section: libs
Installed-Size: 1745
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
Original-Maintainer: Debian XML/SGML Group
<debian-xml-sgml-pkgs@xxxxxxxxxxxxxxxxxxxxxxx>
Architecture: amd64
Version: 2.7.8.dfsg-5.1ubuntu4
Depends: libc6 (>= 2.15), zlib1g (>= 1:1.2.3.3.dfsg)


Package: libxslt1.1
Priority: optional
Section: libs
Installed-Size: 468
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
Original-Maintainer: Debian XML/SGML Group
<debian-xml-sgml-pkgs@xxxxxxxxxxxxxxxxxxxxxxx>
Architecture: amd64
Source: libxslt
Version: 1.1.26-8ubuntu1
Depends: libc6 (>= 2.4), libgcrypt11 (>= 1.4.5), libxml2 (>= 2.7.4)


Any thoughts or suggestions?

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.