Whatif the XML Catalog Manager would allow for translating
SYSTEM and PUBLIC XML document references to
local file references and provide for a configurable mechanism by group using rewrite.
Hack of an untested example:
#CatalogManager.properties
# Always use semicolons in this list.
#This is the pointer to the catalog to use
catalogs=/MavenMasterWeb/conf/example-catalog.xml
catalog-class-name=com.sun.resolver.Resolver
[snip file ref="/MavenMasterWeb/conf/example-catalog.xml">
<?xml version="1.0" ?>
<!-- set the base to the location of your installation -->
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
xml:base="file:///d://MavenMasterWeb/xdoc/">
<group xml:base="file:///d://MavenMasterWeb/xdoc/" >
<rewriteURI
uriStartString="http://MavenMasterWeb.org/virtualmock/virtualmock/xdocs"
rewritePrefix="file:///d://virtualmock/virtualmock/xdocs/" />
<rewriteSystem
uriStartString="http://MavenMasterWeb.org/virtualmock/virtualmock/xdocs"
rewritePrefix="file:///d://virtualmock/virtualmock/xdocs/" />
<!-- perhaps using docbook also.. -->
<nextCatalog catalog="docbook.cat.xml"/>
<!-- also allow for managing specific file artifact versions -->
<uri
name="http://MavenMasterWeb.org/virtualmock/virtualmock/xdocs/test.xml"
uri ="different-version/test.xml"/>
</group>
</catalog>
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 8:33 AM
To: Maven Users List
Subject: RE: Is it impossible to include a common file with xdoc?
The entities are supposed to be resolved relative to the document, not the working
directory.
There's a Maven bug about this; I'm not sure which versions of Maven are affected, but
latest in CVS has the fix.
--
[EMAIL PROTECTED]
Creator, Tapestry: Java Web
Components
http://jakarta.apache.org/tapestry
> 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]
>
---------------------------------------------------------------------
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]