Re: [xml] xsl:value-of on empty tags



I'm having problems (libxml-2.3.3, libxslt-0.4.0) processing empty tags; in
fact, the results seem to be completely wrong.
[...]
The output is:
-snip-
<?xml version="1.0"?>
<FOO>
      <BAR>This is bar 1</BAR>
      <XXX>
      This is bar 2
</XXX>
      <BAR>This is bar 2</BAR>
</FOO>
-snip-

This doesn't seem to be right. If I change the xsl:value-of in the xxx-
template to <xsl:value-of select="text()"/> (or to <xsl:apply-templates/>,
for that matter), the output is more sane.

Am I missing something here?

  No, that's a bug. Or rather that was a bug, hiding in xmlNodeGetContent()
in libxml/tree.c 
  Enclosed patch fixes it,

Daniel

P.S: I suggest you subscribe to the xslt list

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard redhat com  | libxml Gnome XML toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Attachment: tree.c.patch
Description: Text document



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]