switch validation off
Added by Anonymous over 15 years ago
Legacy ID: #7432289 Legacy Poster: gertone (gertone)
Maybe I missed something obvious from the docs... I have XML files that have a doctype, but not directly the DTD at hand. I want to get the transformation (Saxon9B) started without saxon trying to find the DTD Is there some sort of property I can switch off from java, such as -dtd no
Replies (5)
Please register to reply
RE: switch validation off - Added by Anonymous over 15 years ago
Legacy ID: #7432307 Legacy Poster: Michael Kay (mhkay)
You can switch DTD validation off, but that won't stop the XML parser looking for the DTD, because it's needed also for expansion of entity references. (It's not Saxon looking for the DTD, it's the XML parser). The usual solution to this problem is to use an OASIS catalog to redirect the parser to a local copy of the DTD. See for example http://www.sagehill.net/docbookxsl/UseCatalog.html
RE: switch validation off - Added by Anonymous over 15 years ago
Legacy ID: #7432311 Legacy Poster: gertone (gertone)
That sounds a good approach then, thanks
RE: switch validation off - Added by Anonymous over 15 years ago
Legacy ID: #7438038 Legacy Poster: Viente (viente)
I know it is not a Saxon issue, but I tried to follow the instructions in the link above and can't make it working. Any idea what I do wrong? I even tried putting resolver.jar and catalog.xml, CatalogManager.properties and local DTD on the same path as saxon9.jar , to no avail. >java -cp "C:\Israel\Development\xml-commons-resolver-1.2\resolver.jar" -jar saxon9.jar -dtd:off -x:org.apache.xml.resolver.tool s.ResolvingXMLReader -y:org.apache.xml.resolver.tools.ResolvingXMLReader -r:org. apache.xml.resolver.tools.CatalogResolver -u -s:E:\Check\Properties.xml -xsl:E:\Check\convert.xsl -o:E:\Check\outtext.xhtml Transformation failed: Failed to load org.apache.xml.resolver.tools.CatalogResol ver
RE: switch validation off - Added by Anonymous over 15 years ago
Legacy ID: #7438062 Legacy Poster: Michael Kay (mhkay)
When you run a Java application using the -jar option, the class path is ignored. You need to run using -cp (classpath) net.sf.saxon.Transform
RE: switch validation off - Added by Anonymous over 15 years ago
Legacy ID: #7438196 Legacy Poster: Viente (viente)
Now it runs fine. Thanks.
Please register to reply