[kwlug-disc] XML / XSL / XSD/ XSLT 'development' 'environment' / 'gui'?

Adam Glauser adamglauser at gmail.com
Thu Dec 5 17:11:57 EST 2013


On Thu, Dec 5, 2013 at 4:46 PM, Chris Frey <cdfrey at foursquare.net> wrote:

> XSD is your table definition.
> XML is your database.
> XPATH is your SQL.
> XSLT is your programming language.
>
>
Good analogy.

> copious free time

That's the rub. For me, XSLT was unfamiliar enough and difficult enough to
debug that doing my task in XSLT was not feasible. For more complex tasks,
it is worth considering the use of an XML processing library and your
favourite programming language, as John suggested. Generally speaking,
there are two approaches.

The first approach is to have a processor which parses the file and raises
events when elements and other document entities are read. The keyword to
learn more is SAX (Simple API for XML). The main benefit of the SAX-based
approach is that you can essentially process files as large as you can
store, as the entire thing doesn't need to fit in memory at once.

Another approach is for the library to build some hierarchical
representation of the document, which can then be queried (often using
XPATH). This is generally more resource intensive, but often considerably
more convenient. These days, I think this is probably the better approach
unless you have extraordinarily large documents.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20131205/15b885db/attachment.html>


More information about the kwlug-disc mailing list