Re: [xslt] Text output



I don't think I understand the problem - when I do a simple example
stylesheet:

  <?xml version="1.0" encoding="iso-8859-1"?>
  <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="text" encoding="iso-8859-1"/>
  <xsl:template match="/">
    <xsl:text>
      &lt;entities inside xsl:text&gt;
    </xsl:text>
    &lt;just a little junk&gt;
    <xsl:apply-templates/>
  </xsl:template>
  </xsl:stylesheet>

and then apply it against an equally simple xml file:

  <?xml version="1.0" encoding="iso-8859-1"?>
  <TOP>
    &lt;XML data&gt;
  </TOP>

then run our old, reliable xsltproc I get:-
bill@billrouter:/usr/src/libxslt-0.9.0/libxslt$ ./xsltproc bb.xsl bb.xml

  <entities inside xsl:text>

  <just a little junk>

  <XML data>

What am I missing?

Bill Brack
ABC QuickSilver

----- Original Message -----
From: "Echoes" <echoes@free.fr>
To: <xslt@gnome.org>
Sent: Thursday, May 10, 2001 6:43 PM
Subject: [xslt] Text output


>   Hello,
>
>  I'm writing a stylesheet that does output in text mode.
> My problem is to print the '<' and '>' characters. They
> are escaped as &lt; and &gt; when in a CDATA block inside
> <xsl:text>, and of course the stylesheet engine don't let
> me write : <foo>, complaining about a never closed tag.
>
>  Any idea ?
>
>   Thanks
>
> Eugène
>
> _______________________________________________
> xslt mailing list
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
>





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