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]

XSLT text output - better formatting possible?


I'm working on a project that is attempting to incorporate XML into a
large C++ application.  We are defining some of our key data structures
using the XML schema language.  Library header files and several C++
functions are then generated from the schema using XSLT (Xalan-J 1.2) as
part of the build process.  

The goal is to have developers create/modify key data types in XML
schemas, documenting the data types using <annotation> elements, placing
limits on data values using min/max attributes, associating descriptive
types (Time) and units (msec, sec, min, ...) with the data, etc.  We
will then be able to generate much better documentation than currently
exists and the generated C++ functions will include bounds checking
based on given min/max attributes.

Big undertaking, and I'm pretty new at XML/Schema/XSLT/... I have
defined a few data structures in schemas, and have generated .h files
using an XSLT stylesheet.  Output is specified as text (<xsl:output
method="text" indent="yes"/>).  Through use of many <xsl:text> sections
I'm able to get (somewhat) reasonable formatting of the output, but it
is quite painful.  I've basically ignored indention and word wrap in the
output, both of which are critical for reasonable looking .h/.c files.

QUESTION:  is there a better way to generate basic text files from XML
than specifying "text" output from XSLT and liberal use of <xsl:text>
sections?  For example, I will use FOP to produce documentation in .pdf
format.  Is there a FOP-equivalent that generates 'nice looking' ascii
text output?  Or does someone know of a stylesheet that outputs nicely
formatted text?  I know I could write an application that parses the
library schema and spits out .c/.h files formatted as I'd like, but
creating an XSLT stylesheet and using Xalan seemed more
flexible/modular.

Any thoughts on the best direction to proceed would be appreciated...

Thanks
Lyn



-- 
~~~~~~~~~~~~~~~~~
Lyn K. Finman
KES, Inc.
Phone:  757-471-8608
Email:  lfinman@bellatlantic.net
~~~~~~~~~~~~~~~~~


 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]