From: saxon-help-admin@lists.sourceforge.net [mailto:saxon-help-admin@lists.sourceforge.net] On Behalf Of Rick_MacLean@sil.org
Sent: 27 December 2004 20:55
To: saxon-help@lists.sourceforge.net
Subject: [saxon] validating against DTD with -v option


Hi, I am not sure if I have to first subscribe to this list before getting replies or if someone can just reply to me at rick_maclean@sil.org  
 
It's best to subscribe, otherwise I have to moderate all messages. 

Thanks.




I am running the following command (on windows XP) to validate an xml file against the DocBook DTD.  (I am using SaxonB8-1-1.)

java net.sf.saxon.Transform -w2 -v .\XML_Files\BOOK_NOSNumber1March1997.xml DoNothingXslt.xsl

I get the following warning errors:
Warning: on line 2 column 16 of file:/C:/SIL/digpub/ll/src/LLL2DocBook/DoNothingXslt.xsl:
  Error reported by XML parser: Document is invalid: no grammar found.
Warning: on line 2 column 16 of file:/C:/SIL/digpub/ll/src/LLL2DocBook/DoNothingXslt.xsl:
  Error reported by XML parser: Document root element "xsl:stylesheet", must match DOCTYPE  root "null".

The first two lines of DoNothingXslt.xsl are as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">


Is there something wrong with how I am going about using this command when having it validate an xml file against a DTD?  
 
I'm surprised by this: -v should invoke validation for the source document but not for the stylesheet. I'll investigate on my return from holiday.
 
Michael Kay