Before you try to apply your XSLT script, you may want to
validate the XML file against its DTD. To do this, use the
xmllint program:
xmllint --valid --noout filename.xslwhere
is the name of your XML file. Make sure your DTD is in the
same directory and named in a
filename.xsl<!DOCTYPE ...> declaration.
For example, if your XML document uses a DTD named
trails.dtd and its root element
is <trails>,
its first line should look like this:
<!DOCTYPE trails SYSTEM "trails.dtd">
To transform a file using XSLT, use
xsltproc:
xsltproc -ooutput.htmlstylesheet.xslfile.xml
where is the XSLT stylesheet,
stylesheet.xsl
is the XML input file, and
file.xml
is the output file to be written.output.html