Hello all,
I'm new to XSLT and have some questions I hope you folks can answer. I
have an XML file that is geared toward human-readability that I want
transformed into a text file. Here's an example of how the XML looks (I
stole the <intro> section from the Sablotron docs):
<?xml version="1.0" encoding="UTF-8"?>
<faq>
<faqinfo>
<title>My FAQ</title>
</faqinfo>
<intro>
XSLT is a language allowing to transform given XML data (the input)
according to a stylesheet. XSLT stylesheets are themselves XML
documents; that is, all instructions of the language are expressed
in the form of XML elements. The output, i.e. the result of the
processing, is typically a XML document as well, although the
syntactic requirements can be relaxed to allow the creation of a
HTML document (one that contains unclosed tags and the like), or
even plain text.
</intro>
</faq>
I want the text output to look something like this:
<output>
My FAQ
-------------------------------------------------------------------
INTRODUCTION
XSLT is a language allowing to transform given XML data (the
input) according to a stylesheet. XSLT stylesheets are
themselves XML ...
-------------------------------------------------------------------
...
</output>
The problems are that [1] I have all endl's, tabs, and spaces in the
output that are in the original XML file, and [2] I don't know how
to make the paragraphs wrap.
I think xsl:strip-space may solve part of my problem, but I'm not sure.
Is this what xsl:strip-space is for?
How do I solve the paragraph formatting problem? Am I getting into
XSL-FO or can XSLT handle this?
One other thing while I'm here: I haven't seen anyone else request
this, so let me say I could definately use xsl:number support. *grin*
Well, thanks for your time. And a special kudos to the developers.
Sablotron is very nice. Thank God there's an XSLT processor that's
*not* written in Java!
--
Cameron Moore