On Thu, 2003-10-16 at 09:37, [EMAIL PROTECTED] 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,
>
>
>
>
>
>
> [EMAIL PROTECTED]
> 16/10/2003 15:31
> Veuillez r�pondre � "Maven Users List"
>
>
> Pour : Maven Users List <[EMAIL PROTECTED]>
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
jvz.
Jason van Zyl
[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]