You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ni...@arsoe-trelaze.com on 2003/10/16 15:37:47 UTC
Réf. : j:file and xml files
You could have only one DOCTYPE per xml file. Protect the content with a
CDATA section to don't allow the parser analyse the file content.
Try :
<j:file name="${basedir}/resources/application.xml" escapeText="true"
trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
<![CDATA[
<your file content/>
]]>
</j:file>
Nicolas,
emmanuel.boudrant@free.fr
16/10/2003 15:31
Veuillez répondre à "Maven Users List"
Pour : Maven Users List <us...@maven.apache.org>
cc :
Objet : j:file and xml files
Hi,
How can I generate XML files with <j:file ... >, notice that I need to add
DTD
declaration in generated files.
<j:file name="${basedir}/resources/application.xml" escapeText="true"
trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE
Application
1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<application>
<display-name>${j2ee.displayName}</display-name>
<description>${j2ee.displayName}</description>
<module>
<ejb>${ejb}</ejb>
</module>
<module>
<web>
<web-uri>${uri}</web-uri>
<context-root>${j2ee.contextRoot}</context-root>
</web>
</module>
</application>
</j:file>
Maven crash with :
org.xml.sax.SAXParseException: doctype not allowed in content.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at
org.apache.maven.plugin.PluginCacheManager.parse(PluginCacheManager.java:365)
at
org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.java:481)
Thx,
-emmanuel
---------------------------------------------------------------------
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: Réf. : j:file and xml files
Posted by Jason van Zyl <jv...@maven.org>.
On Thu, 2003-10-16 at 09:37, Nicolas.CHALUMEAU@arsoe-trelaze.com wrote:
> You could have only one DOCTYPE per xml file. Protect the content with a
> CDATA section to don't allow the parser analyse the file content.
>
> Try :
>
> <j:file name="${basedir}/resources/application.xml" escapeText="true"
> trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
> <![CDATA[
> <your file content/>
> ]]>
> </j:file>
You can also look at the ant plugin which uses a j:file and j:import
combination which can make things easier for switching the content of
what you want to generate.
> Nicolas,
>
>
>
>
>
>
> emmanuel.boudrant@free.fr
> 16/10/2003 15:31
> Veuillez répondre à "Maven Users List"
>
>
> Pour : Maven Users List <us...@maven.apache.org>
> cc :
> Objet : j:file and xml files
>
>
>
>
> Hi,
>
> How can I generate XML files with <j:file ... >, notice that I need to add
> DTD
> declaration in generated files.
>
> <j:file name="${basedir}/resources/application.xml" escapeText="true"
> trim="true" prettyPrint="true" outputMode="xml" xmlns="dummy">
>
> <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE
> Application
> 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
> <application>
> <display-name>${j2ee.displayName}</display-name>
> <description>${j2ee.displayName}</description>
> <module>
> <ejb>${ejb}</ejb>
> </module>
> <module>
> <web>
> <web-uri>${uri}</web-uri>
> <context-root>${j2ee.contextRoot}</context-root>
> </web>
> </module>
> </application>
>
> </j:file>
>
> Maven crash with :
>
> org.xml.sax.SAXParseException: doctype not allowed in content.
> at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.apache.maven.plugin.PluginCacheManager.parse(PluginCacheManager.java:365)
> at
> org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.java:481)
>
>
> Thx,
> -emmanuel
>
> ---------------------------------------------------------------------
> 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
--
jvz.
Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org
In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
-- Jacques Ellul, The Technological Society
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org