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:
<?xml version="1.0"?>
      <BAR>This is bar 1</BAR>
      This is bar 2
      <BAR>This is bar 2</BAR>

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,


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

Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml Gnome XML toolkit | Rpmfind RPM search engine

Attachment: tree.c.patch
Description: Text document

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