This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

VERY special characters :)


Hello!

I have now looked through the FAQ at:
 http://www.dpawson.co.uk/xsl/xslfaq.html

And althought it was a rather enlightening and interesting experience,
and quite comprehensive, I can't really find anything directly relevant
to what I want.

Short version:

I want to output a control-character (0x00-0x1f) with output method "text".
It's not letting me... :(


Long version:

I'm trying to generate a java file from an xml file, by running the
xml file through XSLT with a .xsl document to transform it. The input
XML file is perfectly fine xml. The problem is in the .xsl document.

I have this setting in my .xsl file:
  <xsl:output encoding="ISO_8859-1" omit-xml-declaration="yes"
              method="text" />

I tried to do this by doing the following in my xxx.xsl file
to get a form-feed:
  <xsl:text>&#12;</xsl:text>

...but this is not a valid XML character, I'm informed. 

Well... I don't care! :) I want a form-feed in my java file. Period.
Now I'm wondering, how do I do that? Please tell me I _can_ do it :-\

And now for something not complete different... :)

Another interesting thing I found while playing around with this was
that the statement in the XSLT spec does not really apply as stated
(at least for apache's "xalan-J") when it says that "text" output
mode does not escape characters (is says so in the
"disable-output-escaping" help on the <xsl:text> tag)... Proof:

If i instead of my illegal "&#12;" put a "&#167;", to get a paragrah
sign, it is gladly swallowed. I get out "&#167;" in the output document,
however, and not a paragraph sign as expected with my settings
of encoding="ISO_8859-1" and method="text"! :-(

Could anyone explain that to me? 

Regards,
  /Mikael

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]