Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 21:49:42 +0100
From:      cpghost <>
To:        Aryeh Friedman <>
Cc:        FreeBSD Mailing List <>
Subject:   Re: OT: XML newbie
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Fri, Dec 11, 2009 at 01:50:40AM -0500, Aryeh Friedman wrote:
> I am a relative XML newbie (i.e. our backend does spit out some XML I
> wrote but it just slapped together with no knowledge of the
> underlaying structure of XML)... Now I am going back and actually
> learning XML... our main application is to insert XML directly into
> XHTML documents and use either CSS or XSLT (don't know enough to pick
> yet) to style them without resorting to javascript...

I'm using xsltproc from the port textproc/libxslt to apply custom
XSLT style sheets to XML files, resulting in XHTML output. Works
great, and is super fast.

xsltproc also understands the xmlns:exsl extensions, which means that
it can generate multiple output files from a single XML input file,
using the exsl:document element (very useful in the context of XHTML
generation where you need to create multiple interlinked pages).

> Now my question what is a good/reasonable set of command line tools
> for working with/debugging/testing all this in such a way I do not
> need to rely on the browser... specifically what types (and specific
> ones if there is a preference) tools do I need and are there any
> recommended procedures for dealing with XML from the command line....
> in the future we may want to also do Java parsing of XML but that
> seems to be well handled already in the JDK (1.6) API.... thanks in
> advance

You can test the XML prior to applying XSLT, using something like
xmllint from textproc/libxml2. xmllint is also particularly useful,
if your main XML file inputs (with xi:include) other XML files (use
the option --xinclude), and it can verify DTD as well.

I also use www/linklint on the set of generated XHTML files to
check for broken links etc..., though I guess it could be automated
at the XML (DTD?) level too.


Cordula's Web.

Want to link to this message? Use this URL: <>