I recently got this to work, with the following changes:

(1)  I prefaced the filename in the ENTITY with "file:" (i.e.
"file:../MavenMasterWeb/xdocs/projectlist.xml").
(2)  My experience is that the reference is resolved based on where you
invoke maven, not where the enclosing doc is located.  This means that if
both xml files are in xdocs, but you'll be invoking maven from one dir up,
you'll need "xdocs/" as part of the filename.  In a multiproject environment
this gets even trickier, which is why I have the multiple directories as
listed above.

HTH,
Paul
 

> -----Original Message-----
> From: Chad Woolley [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 29, 2003 1:49 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Is it impossible to include a common file with xdoc?
> 
> Howard M. Lewis Ship wrote:
> > 
> > I make use of XML external entities:
> > 
> > <!DOCTYPE document [
> >     <!ENTITY % common-links SYSTEM "../common/links.xml">
> >     %common-links;
> >     ]>
> > <document>
> 
> 
> Howard,
> 
> Thanks for your response.  I tried your suggestion, and I 
> cannot get it to work, despite spending a few hours playing 
> with it and searching the web for an answer.  A complete 
> working example would be greatly appreciated.
> 
> 
> 
> Here is my page:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <!DOCTYPE document [
>      <!ENTITY % test SYSTEM "test.xml">
>      %test;
> ]>
> 
> <document>
>      <body>
>          <section name="Section">
>              <subsection name="Subsection">
>                  <ul>
>                  <li>
>                      <strong>
>                        THIS IS THE SUBSECTION CONTENT
>                      </strong>
>                  &test;
>                  </li>
>                  </ul>
>              </subsection>
>          </section>
>      </body>
> </document>
> 
> 
> 
> Here is test.xml:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <document>
>      <body>
>        THIS IS A TEST
>      </body>
> </document>
> 
> 
> 
> And here is the error I get:
> 
> BUILD FAILED
> File...... file:/C:/Documents and
> Settings/cwoolley/.maven/plugins/maven-xdoc-plugin-1.4-SNAPSHOT/
> Element... x:parse
> Line...... 315
> Column.... 43
> Error on line 3 of document
> file:/D:/virtualmock/virtualmock/xdocs/test.xml : The markup 
> declarations contained or pointed to by the document type 
> declaration m ust be well-formed. Nested exception: The 
> markup declarations contained or pointed to by the document 
> type declaration must be well-formed.
> 
> 
> 
> What am I doing wrong?  Could you perhaps provide a working 
> example?  I have tried several different formats for 
> test.xml, but none seem to work.  Any help is appreciated.
> 
> Thank you for your time,
> Chad
> 
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to