You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by thomas woytaszek <tw...@rsasecurity.com> on 2004/08/26 21:35:54 UTC
x:parse DTD validation behind a firewall
Hi,
I'm trying to merge an xml document using xsl. I have an application.xml
document which is generated by maven. How can I bypass parsing of this
element? I don't want to set a proxy, I just want to ignore the DTD
check completely.
Any hints?
Thanks in advance.
Example jelly code:
<postGoal name="ear:generate-ear-descriptor">
<!-- merge the original, and generated descriptors -->
<j:set var="generated" value="${ear.dir}/META-INF/application.xml"/>
<j:set var="original"
value="${merge.dir}/META-INF/application.xml"/>
<echo message="merging application descriptors..."/>
<util:file var="inputFile" name="${generated}"/>
<echo message="----- ${inputFile}"/>
<x:parse validate="false" var="doc" xml="${inputFile}" />
<jsl:stylesheet select="$doc">
<jsl:template match="application/module">
...
</jsl:template>
</jsl:stylesheet>
<echo message="merge complete."/>
</postGoal>
Error:
[echo] merging application descriptors...
[echo] -----
/home/twoytaszek/p4/dev/ims/performance/target/existing_ear/META-INF/application.xml
BUILD FAILED
File......
file:/home/twoytaszek/.maven/plugins/maven-multiproject-plugin-1.2/plugin.jelly
Element... maven:reactor
Line...... 202
Column.... 9
Unable to obtain goal [multiproject:install-snapshot-callback] --
file:/home/twoytaszek/p4/dev/ims/performance/maven.xml:32:62: <x:parse>
Server returned HTTP response code: 403 for URL:
http://java.sun.com/dtd/application_1_3.dtd Nested exception: Server
returned HTTP response code: 403 for URL:
http://java.sun.com/dtd/application_1_3.dtd
Total time: 14 seconds
Finished at: Thu Aug 26 15:32:06 EDT 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: parse DTD validation behind a firewall
Posted by thomas woytaszek <tw...@rsasecurity.com>.
Thank-you! Works like a charm.
On Thu, 2004-08-26 at 19:00, W. Sean Hennessy wrote:
> With the use of a catalog.xml and URI/System rewrite you
> may convert remote references to local ones..
> Then you need only a local copy of the appropriate DTD sets..
> So given the DTD...
> <!DOCTYPE application PUBLIC
> "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
> "http://java.sun.com/dtd/application_1_3.dtd">
>
>
> One might copy the DTD to a local folder.. say "c:/usr/local/share/sdl/dtd"
> and following the example in catalog.xml one would add the following..
>
> <!-- Resolve web URLs to local files -->
> <public publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
> uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
>
> <public systemId="http://java.sun.com/dtd/application_1_3.dtd"
> uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
>
> <uri name="http://java.sun.com/dtd/application_1_3.dtd""
> uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
>
>
>
> > -----Original Message-----
> > From: thomas woytaszek [mailto:twoytaszek@rsasecurity.com]
> > Sent: Thursday, August 26, 2004 12:36 PM
> > To: Maven Users List
> > Subject: x:parse DTD validation behind a firewall
> >
> >
> > Hi,
> >
> > I'm trying to merge an xml document using xsl. I have an
> > application.xml
> > document which is generated by maven. How can I bypass parsing of this
> > element? I don't want to set a proxy, I just want to ignore the DTD
> > check completely.
> >
> > Any hints?
> >
> > Thanks in advance.
> >
> > Example jelly code:
> > <postGoal name="ear:generate-ear-descriptor">
> > <!-- merge the original, and generated descriptors -->
> > <j:set var="generated"
> > value="${ear.dir}/META-INF/application.xml"/>
> > <j:set var="original"
> > value="${merge.dir}/META-INF/application.xml"/>
> > <echo message="merging application descriptors..."/>
> > <util:file var="inputFile" name="${generated}"/>
> > <echo message="----- ${inputFile}"/>
> > <x:parse validate="false" var="doc" xml="${inputFile}" />
> >
> >
> > <jsl:stylesheet select="$doc">
> > <jsl:template match="application/module">
> > ...
> > </jsl:template>
> > </jsl:stylesheet>
> > <echo message="merge complete."/>
> > </postGoal>
> >
> >
> > Error:
> > [echo] merging application descriptors...
> > [echo] -----
> > /home/twoytaszek/p4/dev/ims/performance/target/existing_ear/ME
> > TA-INF/application.xml
> >
> > BUILD FAILED
> > File......
> > file:/home/twoytaszek/.maven/plugins/maven-multiproject-plugin
> -1.2/plugin.jelly
> Element... maven:reactor
> Line...... 202
> Column.... 9
> Unable to obtain goal [multiproject:install-snapshot-callback] --
> file:/home/twoytaszek/p4/dev/ims/performance/maven.xml:32:62: <x:parse>
> Server returned HTTP response code: 403 for URL:
> http://java.sun.com/dtd/application_1_3.dtd Nested exception: Server
> returned HTTP response code: 403 for URL:
> http://java.sun.com/dtd/application_1_3.dtd
> Total time: 14 seconds
> Finished at: Thu Aug 26 15:32:06 EDT 2004
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: parse DTD validation behind a firewall
Posted by "W. Sean Hennessy" <sh...@goldenhourdata.com>.
With the use of a catalog.xml and URI/System rewrite you
may convert remote references to local ones..
Then you need only a local copy of the appropriate DTD sets..
So given the DTD...
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
One might copy the DTD to a local folder.. say "c:/usr/local/share/sdl/dtd"
and following the example in catalog.xml one would add the following..
<!-- Resolve web URLs to local files -->
<public publicId="-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
<public systemId="http://java.sun.com/dtd/application_1_3.dtd"
uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
<uri name="http://java.sun.com/dtd/application_1_3.dtd""
uri="file:///C:/usr/local/share/sdl/dtd/application_1_3.dtd"/>
> -----Original Message-----
> From: thomas woytaszek [mailto:twoytaszek@rsasecurity.com]
> Sent: Thursday, August 26, 2004 12:36 PM
> To: Maven Users List
> Subject: x:parse DTD validation behind a firewall
>
>
> Hi,
>
> I'm trying to merge an xml document using xsl. I have an
> application.xml
> document which is generated by maven. How can I bypass parsing of this
> element? I don't want to set a proxy, I just want to ignore the DTD
> check completely.
>
> Any hints?
>
> Thanks in advance.
>
> Example jelly code:
> <postGoal name="ear:generate-ear-descriptor">
> <!-- merge the original, and generated descriptors -->
> <j:set var="generated"
> value="${ear.dir}/META-INF/application.xml"/>
> <j:set var="original"
> value="${merge.dir}/META-INF/application.xml"/>
> <echo message="merging application descriptors..."/>
> <util:file var="inputFile" name="${generated}"/>
> <echo message="----- ${inputFile}"/>
> <x:parse validate="false" var="doc" xml="${inputFile}" />
>
>
> <jsl:stylesheet select="$doc">
> <jsl:template match="application/module">
> ...
> </jsl:template>
> </jsl:stylesheet>
> <echo message="merge complete."/>
> </postGoal>
>
>
> Error:
> [echo] merging application descriptors...
> [echo] -----
> /home/twoytaszek/p4/dev/ims/performance/target/existing_ear/ME
> TA-INF/application.xml
>
> BUILD FAILED
> File......
> file:/home/twoytaszek/.maven/plugins/maven-multiproject-plugin
-1.2/plugin.jelly
Element... maven:reactor
Line...... 202
Column.... 9
Unable to obtain goal [multiproject:install-snapshot-callback] --
file:/home/twoytaszek/p4/dev/ims/performance/maven.xml:32:62: <x:parse>
Server returned HTTP response code: 403 for URL:
http://java.sun.com/dtd/application_1_3.dtd Nested exception: Server
returned HTTP response code: 403 for URL:
http://java.sun.com/dtd/application_1_3.dtd
Total time: 14 seconds
Finished at: Thu Aug 26 15:32:06 EDT 2004
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org