You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Soni, Ashish IN BLR SISL" <as...@siemens.com> on 2012/02/06 06:39:16 UTC
Disable DTD validation
Hello all!
I have a XML document with <DOCTYPE> section: <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"> (XML coverage report of cobertura)
When I try process this document with <xslt> task, it fails with ConnectException. How can I prevent XSLT processor from validating of XML document? Or may be from loading external DTDs.
I check old post they are taking about xmlcatalog, but in above dtd we don't have publicid.
Any help is appreciated!
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353
mailto.: ashish.soni@siemens.com<ma...@siemens.com>
www.siemens.co.in<http://www.siemens.co.in>
RE: Disable DTD validation
Posted by "Soni, Ashish IN BLR SISL" <as...@siemens.com>.
After update
<xmlcatalog>
<dtd systemid="http://cobertura.sourceforge.net/xml/coverage-04.dtd" location="${basedir}/coverage-04.dtd"/>
</xmlcatalog>
dtd doesn't support the "systemid" attribute.
ANT VERSION: Apache Ant version 1.7.1 compiled on June 27 2008
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353
mailto.: ashish.soni@siemens.com<ma...@siemens.com>
www.siemens.co.in<http://www.siemens.co.in>
________________________________
From: Andy Stevens [mailto:insomniacpenguin@googlemail.com]
Sent: Monday, February 06, 2012 2:44 PM
To: Soni, Ashish IN BLR SISL
Cc: Ant Users List
Subject: RE: Disable DTD validation
Your doctype doesn't include a public ID (that's not the same thing as the root element).
Try
<dtd systemid="http://cobertura.sourceforge.net/xml/coverage-04.dtd" location=...
Andy.
On 6 Feb 2012 08:17, "Soni, Ashish IN BLR SISL" <as...@siemens.com>> wrote:
I tried with below file but still it is checking for network connection.
<project basedir="." name="hazard" default="TransformFile">
<property name="in.xml" value="coverage.xml"/>
<property name="out.file" value="hazardSource.html"/>
<property name="xslt.file" value="Convert.xslt"/>
<property name="sources" value="V:/ic010375_nt_vb36b/sdm/src/j_mods"/>
<target name="TransformFile">
<!-- Transform one file into an HTML file -->
<xslt in="${in.xml}" out="${out.file}"
style="${xslt.file}">
<xmlcatalog>
<dtd publicid="coverage" location="${basedir}/coverage-04.dtd"/>
</xmlcatalog>
</xslt>
</target>
</project>
DTD entry in coverage.xml is
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
Note: I created empty file in basedir with name coverage-04.dtd
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353<tel:%2B91%2080%202511%203353>
mailto.: ashish.soni@siemens.com<ma...@siemens.com>
www.siemens.co.in<http://www.siemens.co.in>
________________________________
From: Andy Stevens [mailto:insomniacpenguin@googlemail.com<ma...@googlemail.com>]
Sent: Monday, February 06, 2012 1:29 PM
To: Ant Users List
Cc: Soni, Ashish IN BLR SISL
Subject: Re: Disable DTD validation
You need to supply a catalog entry to map the system uri to a local copy. Can't remember the details offhand, but I'm pretty sure the task's configuration allows for this. Or it might be a separate xml catalog task. Check the docs.
Andy
On 6 Feb 2012 05:41, "Soni, Ashish IN BLR SISL" <as...@siemens.com>> wrote:
Hello all!
I have a XML document with <DOCTYPE> section: <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"> (XML coverage report of cobertura)
When I try process this document with <xslt> task, it fails with ConnectException. How can I prevent XSLT processor from validating of XML document? Or may be from loading external DTDs.
I check old post they are taking about xmlcatalog, but in above dtd we don't have publicid.
Any help is appreciated!
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353<tel:%2B91%2080%202511%203353>
mailto.: ashish.soni@siemens.com<ma...@siemens.com>>
www.siemens.co.in<http://www.siemens.co.in><http://www.siemens.co.in>
RE: Disable DTD validation
Posted by Andy Stevens <in...@googlemail.com>.
Your doctype doesn't include a public ID (that's not the same thing as the
root element).
Try
<dtd systemid="http://cobertura.sourceforge.net/xml/coverage-04.dtd"
location=...
Andy.
On 6 Feb 2012 08:17, "Soni, Ashish IN BLR SISL" <as...@siemens.com>
wrote:
> ** ** ** ** ** ** **
>
> I tried with below file but still it is checking for network connection.**
> **
>
> ** **
>
> <project basedir="." name="hazard" default="TransformFile">****
>
> <property name="in.xml" value="coverage.xml"/>****
>
> <property name="out.file" value="hazardSource.html"/>****
>
> <property name="xslt.file" value="Convert.xslt"/>****
>
> <property name="sources" value="V:/ic010375_nt_vb36b/sdm/src/j_mods"
> />****
>
> ** **
>
> <target name="TransformFile">****
>
> <!-- Transform one file into an HTML file -->****
>
> <xslt in="${in.xml}" out="${out.file}"****
>
> style="${xslt.file}">****
>
> *<xmlcatalog>***
>
> * **<dtd** **publicid=**"coverage"** **location=**
> "${basedir}/coverage-04.dtd"**/>***
>
> * **</xmlcatalog>***
>
> </xslt>****
>
> </target>****
>
> </project>****
>
> ** **
>
> DTD entry in coverage.xml is****
>
> *<!DOCTYPE coverage SYSTEM "
> http://cobertura.sourceforge.net/xml/coverage-04.dtd">*
>
> * *
>
> *Note: *I created empty file in basedir with name *coverage-04.dtd*****
>
> ** **
>
> ----------------------------------------------------------------****
>
> With best regards,****
>
> Ashish Soni****
>
> ****
>
> Siemens Information Systems Ltd. ****
>
> Corporate Technology****
>
> Corporate Development Center India****
>
> Healthcare 1****
>
> PACS****
>
> ****
>
> No 84, Keonics Electronics City,****
>
> Hosur Road, Bangalore 560100****
>
> Tel.: +91 80 2511 3353****
>
> mailto.: ashish.soni@siemens.com****
>
> www.siemens.co.in****
> ------------------------------
>
> *From:* Andy Stevens [mailto:insomniacpenguin@googlemail.com]
> *Sent:* Monday, February 06, 2012 1:29 PM
> *To:* Ant Users List
> *Cc:* Soni, Ashish IN BLR SISL
> *Subject:* Re: Disable DTD validation****
>
> ** **
>
> You need to supply a catalog entry to map the system uri to a local copy.
> Can't remember the details offhand, but I'm pretty sure the task's
> configuration allows for this. Or it might be a separate xml catalog task.
> Check the docs.****
>
> Andy****
>
> On 6 Feb 2012 05:41, "Soni, Ashish IN BLR SISL" <as...@siemens.com>
> wrote:****
>
> Hello all!
>
> I have a XML document with <DOCTYPE> section: <!DOCTYPE coverage SYSTEM "
> http://cobertura.sourceforge.net/xml/coverage-04.dtd"> (XML coverage
> report of cobertura)
>
> When I try process this document with <xslt> task, it fails with
> ConnectException. How can I prevent XSLT processor from validating of XML
> document? Or may be from loading external DTDs.
>
> I check old post they are taking about xmlcatalog, but in above dtd we
> don't have publicid.
>
> Any help is appreciated!
>
> ----------------------------------------------------------------
> With best regards,
> Ashish Soni
>
> Siemens Information Systems Ltd.
> Corporate Technology
> Corporate ****Development Center** **India****
> Healthcare 1
> PACS
>
> No 84, ****Keonics** **Electronics** **City****,
> ****Hosur Road**, **Bangalore**** 560100
> Tel.: +91 80 2511 3353 <%2B91%2080%202511%203353>
> mailto.: ashish.soni@siemens.com<ma...@siemens.com>
> www.siemens.co.in<http://www.siemens.co.in>****
>
RE: Disable DTD validation
Posted by "Soni, Ashish IN BLR SISL" <as...@siemens.com>.
I tried with below file but still it is checking for network connection.
<project basedir="." name="hazard" default="TransformFile">
<property name="in.xml" value="coverage.xml"/>
<property name="out.file" value="hazardSource.html"/>
<property name="xslt.file" value="Convert.xslt"/>
<property name="sources" value="V:/ic010375_nt_vb36b/sdm/src/j_mods"/>
<target name="TransformFile">
<!-- Transform one file into an HTML file -->
<xslt in="${in.xml}" out="${out.file}"
style="${xslt.file}">
<xmlcatalog>
<dtd publicid="coverage" location="${basedir}/coverage-04.dtd"/>
</xmlcatalog>
</xslt>
</target>
</project>
DTD entry in coverage.xml is
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
Note: I created empty file in basedir with name coverage-04.dtd
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353
mailto.: ashish.soni@siemens.com<ma...@siemens.com>
www.siemens.co.in<http://www.siemens.co.in>
________________________________
From: Andy Stevens [mailto:insomniacpenguin@googlemail.com]
Sent: Monday, February 06, 2012 1:29 PM
To: Ant Users List
Cc: Soni, Ashish IN BLR SISL
Subject: Re: Disable DTD validation
You need to supply a catalog entry to map the system uri to a local copy. Can't remember the details offhand, but I'm pretty sure the task's configuration allows for this. Or it might be a separate xml catalog task. Check the docs.
Andy
On 6 Feb 2012 05:41, "Soni, Ashish IN BLR SISL" <as...@siemens.com>> wrote:
Hello all!
I have a XML document with <DOCTYPE> section: <!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"> (XML coverage report of cobertura)
When I try process this document with <xslt> task, it fails with ConnectException. How can I prevent XSLT processor from validating of XML document? Or may be from loading external DTDs.
I check old post they are taking about xmlcatalog, but in above dtd we don't have publicid.
Any help is appreciated!
----------------------------------------------------------------
With best regards,
Ashish Soni
Siemens Information Systems Ltd.
Corporate Technology
Corporate Development Center India
Healthcare 1
PACS
No 84, Keonics Electronics City,
Hosur Road, Bangalore 560100
Tel.: +91 80 2511 3353<tel:%2B91%2080%202511%203353>
mailto.: ashish.soni@siemens.com<ma...@siemens.com>>
www.siemens.co.in<http://www.siemens.co.in><http://www.siemens.co.in>
Re: Disable DTD validation
Posted by Andy Stevens <in...@googlemail.com>.
You need to supply a catalog entry to map the system uri to a local copy.
Can't remember the details offhand, but I'm pretty sure the task's
configuration allows for this. Or it might be a separate xml catalog task.
Check the docs.
Andy
On 6 Feb 2012 05:41, "Soni, Ashish IN BLR SISL" <as...@siemens.com>
wrote:
> Hello all!
>
> I have a XML document with <DOCTYPE> section: <!DOCTYPE coverage SYSTEM "
> http://cobertura.sourceforge.net/xml/coverage-04.dtd"> (XML coverage
> report of cobertura)
>
> When I try process this document with <xslt> task, it fails with
> ConnectException. How can I prevent XSLT processor from validating of XML
> document? Or may be from loading external DTDs.
>
> I check old post they are taking about xmlcatalog, but in above dtd we
> don't have publicid.
>
> Any help is appreciated!
>
> ----------------------------------------------------------------
> With best regards,
> Ashish Soni
>
> Siemens Information Systems Ltd.
> Corporate Technology
> Corporate Development Center India
> Healthcare 1
> PACS
>
> No 84, Keonics Electronics City,
> Hosur Road, Bangalore 560100
> Tel.: +91 80 2511 3353
> mailto.: ashish.soni@siemens.com<ma...@siemens.com>
> www.siemens.co.in<http://www.siemens.co.in>
>
>