xsl-list
[Top] [All Lists]

RE: XSLT newbie looking for an easy to use processor (java)

2005-12-22 06:54:58
As the topic already states I'm looking for an easy to use 
XSLT processor (in Java), 

The two Java processors that are most widely used nowadays are Xalan and
Saxon. At your current level of knowledge either will do the job. Both are
open source. Xalan is bundled into the Sun JDK. Saxon is usually faster and
supports the more recent version of the language, XSLT 2.0.

I want to pass an XML string and a corresponding XSLT 
description to it, which is used to sort of parse the XML 
string. 

Yes, that's what XSLT processors do.

The XML string will contain a number of 
items/elements (like name, phone and so on) and there are a 
number of XSLT descriptions, one for each parameter, to sort 
of crop the string so it will only contain the needed 
parameter. So all I need is a XSLT processor which is easy to 
use, accepts an XML string for input and returns another 
string as a result.

Actually, XSLT processing consists of three stages:

(1) parse the XML string into a tree representation
(2) transform this source tree into a result tree
(3) serialize this result tree back into XML (or HTML, or plain text)

The core of XSLT processing is step (2).

(Additionally :
In case the result of an XSL transformation should contain 
more than just one item it should be possible to define a 
delimiter for the result string so I can distinguish the 
items (I can't think of an appropriate example ... let's say 
there are two items called "Name" in the XML string ;P)

The result of the transformation will normally be XML, so the "delimiters"
will usually be represented by XML markup. But you can generate different
delimiters it that's what the receiving application requires.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>