Issue with SVG DTD validation with XEP/Oxygen (Dita source -
This should cover W3C XML Schema, Relax NG and DTD related problems.
Issue with SVG DTD validation with XEP/Oxygen (Dita source -
Hello,
I'm using XEP to create PDF files from DITA source files in Oxygen. I'm having trouble with the DTD validation (in details, if I comment the doctype declaration, there is no problem, if I leave the doctype declaration, I got the following error message
As indicated in xep user documentation, I tried to set up a catalog to have XEP validate with a local DTD but to no avail.
Here is what I did:
1/ Copied svg10.dtd and svg11.dtd from Oxygen directory to C:\XML_DTD (Windows 7 OS).
2/ Downloaded xml-commons-resolver-1.2 (so resolver.jar is in C:\XML_DTD\xml-commons-resolver-1.2).
3/ Created a catalog file as follows (catalog.xml in C:\XML_DTD):
4/ Created a properties file (CatalogManager.properties in C:\XML_DTD) as follows:
catalogs=C:/XML_DTD/catalog.xml
5/ Modified XEP batch script as follows:
6/ Added system environment variable:
But it doesn't work, the transformation in Oxygen still fails. Any idea of what I'd have missed?
Thanks & regards,
(Also posting this question on Xep support email list and maybe Yahoo dita users group).
I'm using XEP to create PDF files from DITA source files in Oxygen. I'm having trouble with the DTD validation (in details, if I comment the doctype declaration, there is no problem, if I leave the doctype declaration, I got the following error message
which I think is caused by the online validation blocked by the company proxy).[java] EXCEPTION: Failed to create image file:/D:/SVN-Annette/IFU_MT/Sources/Projet_ong/trunk/graphics/device_identification_label_SN.svg of type null
As indicated in xep user documentation, I tried to set up a catalog to have XEP validate with a local DTD but to no avail.
Here is what I did:
1/ Copied svg10.dtd and svg11.dtd from Oxygen directory to C:\XML_DTD (Windows 7 OS).
2/ Downloaded xml-commons-resolver-1.2 (so resolver.jar is in C:\XML_DTD\xml-commons-resolver-1.2).
3/ Created a catalog file as follows (catalog.xml in C:\XML_DTD):
Code: Select all
<?xml version="1.0"?>
<!--<!DOCTYPE catalog
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> -->
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public
publicId="-//W3C//DTD SVG 1.1//EN"
uri="file:///c:/xml_dtd/svg11.dtd"/>
<system
systemId="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"
uri="file:///c:/xml_dtd/svg11.dtd"/>
</catalog>
catalogs=C:/XML_DTD/catalog.xml
Code: Select all
relative-catalogs=yes
verbosity=4
prefer=system
static-catalog=yes
allow-oasis-xml-catalog-pi=yes
Code: Select all
@echo off
rem This batch file encapsulates a standard XEP call.
set CP=C:\XML_DTD\xml-commons-resolver-1.2;C:\Program Files\RenderX\XEP\lib\xep.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon-xml-apis.jar;C:\Program Files\RenderX\XEP\lib\xt.jar
if x%OS%==xWindows_NT goto WINNT
"C:\Program Files\Java\jre6\bin\java" -Dcom.renderx.sax.entityresolver=org.apache.xml.resolver.tools.CatalogResolver \
-Dcom.renderx.jaxp.uriresolver=org.apache.resolver.tools.CatalogResolver \ -classpath "%CP%" com.renderx.xep.XSLDriver "-DCONFIG=C:\Program Files\RenderX\XEP\xep.xml" %1 %2 %3 %4 %5 %6 %7 %8 %9
goto END
:WINNT
"C:\Program Files\Java\jre6\bin\java" -classpath "%CP%" com.renderx.xep.XSLDriver "-DCONFIG=C:\Program Files\RenderX\XEP\xep.xml" %*
:END
set CP=
Code: Select all
CLASSPATH=C:\XML_DTD\xml-commons-resolver-1.2\resolver.jar;C:\XML_DTD\CatalogManager.properties
Thanks & regards,
(Also posting this question on Xep support email list and maybe Yahoo dita users group).
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Post by sorin_ristache »
Hello,
I think this is the correct way of fixing the SVG validation error in a PDF transformation.annetteb wrote:As indicated in xep user documentation, I tried to set up a catalog to have XEP validate with a local DTD but to no avail.
Please add the C:\XML_DTD directory to the classpath and also make sure that resolver.jar is in the classpath:annetteb wrote: 5/ Modified XEP batch script as follows:Code: Select all
@echo off
rem This batch file encapsulates a standard XEP call.
set CP=C:\XML_DTD\xml-commons-resolver-1.2;C:\Program Files\RenderX\XEP\lib\xep.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon-xml-apis.jar;C:\Program Files\RenderX\XEP\lib\xt.jar
. . .
Code: Select all
. . .
set CP=C:\XML_DTD\xml-commons-resolver-1.2\resolver.jar;C:\Program Files\RenderX\XEP\lib\xep.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon.jar;C:\Program Files\RenderX\XEP\lib\saxon6.5.5\saxon-xml-apis.jar;C:\Program Files\RenderX\XEP\lib\xt.jar;C:\XML_DTD
. . .
I think this is ignored by the XEP batch process.annetteb wrote:6/ Added system environment variable:
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Post by sorin_ristache »
Hi Annette,
What DOCTYPE declaration does the device_identification_label_SN.svg image file contain? Is it like the following?
If yes the error coud have other cause than the DOCTYPE declaration in the SVG image file, which means it would be much better if you could send a small set of sample DITA XML files for reproducing the error: a sample DITA map file and the topics pulled into the map, including the SVG image file(s) but excluding the XEP processor files (xep.jar, xt.jar, xep.bat, etc).
What DOCTYPE declaration does the device_identification_label_SN.svg image file contain? Is it like the following?
Code: Select all
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Post by sorin_ristache »
Please send them.
Incidentally what does the XEP support team think about this error? Do they have a nice quick solution for you?
Incidentally what does the XEP support team think about this error? Do they have a nice quick solution for you?
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Post by sorin_ristache »
Hi Annette,
I confirm the error is in the device_identification_label_SN.svg image file. I still have some problems here with setting up the XML catalog for the XEP processor but I can give you a quick workaround for now: comment out the DOCTYPE declaration in the device_identification_label_SN.svg image file. I see that you already have the DOCTYPE declaration commented out in the other SVG files, so why not simply make device_identification_label_SN.svg consistent with the other image files? Like the following:
<!-- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -->
I confirm the error is in the device_identification_label_SN.svg image file. I still have some problems here with setting up the XML catalog for the XEP processor but I can give you a quick workaround for now: comment out the DOCTYPE declaration in the device_identification_label_SN.svg image file. I see that you already have the DOCTYPE declaration commented out in the other SVG files, so why not simply make device_identification_label_SN.svg consistent with the other image files? Like the following:
<!-- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -->
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Hi Sorin,
As you guessed we commented out the doctype declaration to be able to generate PDFs. However I'd like to be able to generate PDFs with "correct" SVG files (that is, with the doctype declaration).
First because it's the best way to make sure our SVG files are valid (conform to the DTD). Later in our process, some of these SVG files will be translated and I think the DTD validation is very useful to make sure no error is introduced during translation.
Also, the writer working on the SVG files seem to have issues to open the files in the graphic editor when the doctype is commented. So today, he edits the xml, adds the doctype declaration, opens the file in Illustrator, then re-edits the xml and comment out the declaration. That's really time consuming.
That's the reason why I'm trying to solve the issue at XEP level. I hope XEP support team will be able to help on this as well.
Regards,
Annette
As you guessed we commented out the doctype declaration to be able to generate PDFs. However I'd like to be able to generate PDFs with "correct" SVG files (that is, with the doctype declaration).
First because it's the best way to make sure our SVG files are valid (conform to the DTD). Later in our process, some of these SVG files will be translated and I think the DTD validation is very useful to make sure no error is introduced during translation.
Also, the writer working on the SVG files seem to have issues to open the files in the graphic editor when the doctype is commented. So today, he edits the xml, adds the doctype declaration, opens the file in Illustrator, then re-edits the xml and comment out the declaration. That's really time consuming.
That's the reason why I'm trying to solve the issue at XEP level. I hope XEP support team will be able to help on this as well.
Regards,
Annette
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Hi Annette,
I answered you here:
https://groups.yahoo.com/neo/groups/dit ... ages/36136
Regards,
Radu
I answered you here:
https://groups.yahoo.com/neo/groups/dit ... ages/36136
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Hi Radu,
I tested your solution and it works! Thanks a lot for your help!
BTW: I have to tell you that my coworker just started to work with Oxygen editor and find it very very handy. There are so many small features that are very useful and make our life much simpler.
Best regards,
Annette
I tested your solution and it works! Thanks a lot for your help!
BTW: I have to tell you that my coworker just started to work with Oxygen editor and find it very very handy. There are so many small features that are very useful and make our life much simpler.
Best regards,
Annette
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Hi,
I'm having exactly the same problem as annetteb, and tried out the fix that was suggested on the yahoo group:
You'll find below the diff of what I changed in the build.xml file:
I didn't create a specific catalog file, but added the svg DTD to the existing catalog instead.
For now, I have commented out the doctype declaration in the svg files, but for the same reasons as Annetteb, I'd like to find a clean fix instead.
Thanks,
-Guillaume
I'm having exactly the same problem as annetteb, and tried out the fix that was suggested on the yahoo group:
You'll find below the diff of what I changed in the build.xml file:
Code: Select all
diff --git a/demo/fo/build.xml b/demo/fo/build.xml
index 08cbcfe..1974b41 100644
--- a/demo/fo/build.xml
+++ b/demo/fo/build.xml
@@ -154,6 +152,8 @@ with those set forth herein.
<path id="xep.class.path">
<fileset dir="${xep.dir}/lib" includes="**/*.jar"/>
<pathelement location="${fo.lib.dir}/fo.jar"/>
+ <pathelement location="${lib.dir}/saxon/saxon-xml-apis.jar"/>
+ <pathelement location="${lib.dir}/resolver.jar"/>
</path>
<target name="preview.topic.pdf">
@@ -416,6 +416,11 @@ with those set forth herein.
<arg line='"${inputFile}" "${outputFile}" failOnError=${xep.failOnError}'/>
<classpath refid="xep.class.path"/>
<sysproperty key="com.renderx.xep.CONFIG" value="${xep.config.file}"/>
+
+ <!-- Add custom property to solve SVG dtd resolution-->
+ <sysproperty key="com.renderx.sax.entityresolver" value="org.apache.xml.resolver.tools.CatalogResolver"/>
+ <sysproperty key="xml.catalog.files" value="../../../catalog-dita.xml"/>
For now, I have commented out the doctype declaration in the svg files, but for the same reasons as Annetteb, I'd like to find a clean fix instead.
Thanks,
-Guillaume
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Issue with SVG DTD validation with XEP/Oxygen (Dita sour
Post by sorin_ristache »
Adding the two sysproperty elements at the end of the ANT task that runs the XEP processor should be enough, since the resolver.jar is already in the classpath created by the Oxygen transformation.GSejourne wrote:For now, I have commented out the doctype declaration in the svg files, but for the same reasons as Annetteb, I'd like to find a clean fix instead.
The second sysproperty element should point to an XML catalog file that resolves the DTD declaration in your SVG file.GSejourne wrote:I didn't create a specific catalog file, but added the svg DTD to the existing catalog instead.
Where is demo/fo/build.xml located more exactly? Is it the older PDF plugin in old versions of DITA-OT? In what Oxygen version do you get the error?GSejourne wrote:Code: Select all
diff --git a/demo/fo/build.xml b/demo/fo/build.xml
Regards,
Sorin
<oXygen/> XML Editor Support
Sorin
<oXygen/> XML Editor Support
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service