Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > printing XML file with XSLT code

Reply
Thread Tools

printing XML file with XSLT code

 
 
Hermann Peifer
Guest
Posts: n/a
 
      06-13-2008
On Jun 13, 3:55 pm, "Joseph J. Kesselman" <(E-Mail Removed)>
wrote:
> Hermann Peifer wrote:
> > Big files (say: 100+ MB), with a flat, regular structure -> XMLgawk
> > Small files with many optional and/or empty elements -> XSL

>
> Depends in part the XSLT processor, of course. Some handle large
> documents better than others.


Of course. Reality is not as black and white as my rule of thumb
suggests. Would you have any pointer to some helpful XSLT processor
comparison/benchmarking?

BTW, another rule of thumb is:

Transformation: XML to text, with regex string processing -> XMLgawk
Transformation: XML to XML (in my context usually: XML to KML) -> XSL

Hermann
 
Reply With Quote
 
 
 
 
Joseph J. Kesselman
Guest
Posts: n/a
 
      06-13-2008
Hermann Peifer wrote:
> Of course. Reality is not as black and white as my rule of thumb
> suggests. Would you have any pointer to some helpful XSLT processor
> comparison/benchmarking?


Most of what I've been doing has been using the W3C/NIST XPath and XSLT
conformance suites (pointed to from http://www.w3.org/QA/TheMatrix),
test sets such as the DataPower (now IBM) XSLTMark kernels (described at
http://www.xml.com/pub/a/2001/03/28/xsltmark/), or customer datasets
(which for obvious reasons I can't share).

I do know that the XSLT processor in the DataPower product can recognize
at least some cases where a document can be processed in a streaming
manner rather than reading it all into memory at once. That depends on
the nature of the stylesheet, of course; I'm not sure exactly where the
current limits are. But when this optimization works, it permits
handling huge documents and reduces latency, both of which are good
things. Websearch on "DataPower streaming" finds some discussion of this.

I don't think Apache Xalan has any true streaming capability yet, though
we've wanted it for many years. However, Xalan's internal data model
(DTM) is considerably more space-efficient than a standard Java DOM,
which improves its ability to handle large documents. (We had a version
of DTM which reduced overhead to only 16 bytes per XML node -- but
compressing things that far cost us some performance and imposed some
limitations we didn't like, so we had to let it grow a bit.)

I haven't used XMLgawk. But part of the point of XML is precisely that
adopting a shared (and relatively simple) syntax eases the task of
writing useful and reusable tools, and there's certainly a large amount
of "let a thousand flowers bloom" built into that assumption. I prefer
to stick to the W3C's standardized tools as much as possible, both to
push those to improve and for best portability of my work, but if
another tool does something XSLT really can't, or does it far better
than the copy of XSLT you have available to you, I'm not going to tell
you not to use it.
 
Reply With Quote
 
 
 
 
Hermann Peifer
Guest
Posts: n/a
 
      06-15-2008
Joseph J. Kesselman wrote:
> Hermann Peifer wrote:
>> Of course. Reality is not as black and white as my rule of thumb
>> suggests. Would you have any pointer to some helpful XSLT processor
>> comparison/benchmarking?

>
> Most of what I've been doing has been using the W3C/NIST XPath and XSLT
> conformance suites (pointed to from http://www.w3.org/QA/TheMatrix),
> test sets such as the DataPower (now IBM) XSLTMark kernels (described at
> http://www.xml.com/pub/a/2001/03/28/xsltmark/), or customer datasets
> (which for obvious reasons I can't share).
>
> I do know that the XSLT processor in the DataPower product can recognize
> at least some cases where a document can be processed in a streaming
> manner rather than reading it all into memory at once. That depends on
> the nature of the stylesheet, of course; I'm not sure exactly where the
> current limits are. But when this optimization works, it permits
> handling huge documents and reduces latency, both of which are good
> things. Websearch on "DataPower streaming" finds some discussion of this.
>
> I don't think Apache Xalan has any true streaming capability yet, though
> we've wanted it for many years. However, Xalan's internal data model
> (DTM) is considerably more space-efficient than a standard Java DOM,
> which improves its ability to handle large documents. (We had a version
> of DTM which reduced overhead to only 16 bytes per XML node -- but
> compressing things that far cost us some performance and imposed some
> limitations we didn't like, so we had to let it grow a bit.)
>
> I haven't used XMLgawk. But part of the point of XML is precisely that
> adopting a shared (and relatively simple) syntax eases the task of
> writing useful and reusable tools, and there's certainly a large amount
> of "let a thousand flowers bloom" built into that assumption. I prefer
> to stick to the W3C's standardized tools as much as possible, both to
> push those to improve and for best portability of my work, but if
> another tool does something XSLT really can't, or does it far better
> than the copy of XSLT you have available to you, I'm not going to tell
> you not to use it.


Thanks for the information.

I can't remember that I ever came across something that XSLT really can't do, but string processing is obviously not a strength of XSLT 1.0. I read that this improved with version 2.0, but I don't have any own experience. For transforming large XML documents into text format, which in my context often includes some regex based string processing: XMLgawk continues to be my favourite tool.

Hermann
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM
Problem to insert an XML-element by XSLT-converting from one XML-file into another XML-file jkflens XML 2 05-30-2006 09:41 AM
Including XSLT/XML document within a XSLT document dar_imiro@hotmail.com XML 4 12-13-2005 02:26 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM



Advertisments