OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

entity-resolution-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [entity-resolution-comment] Public Comment


I've done something along this line to avoid updating the catalog entry 
file that resolves URIs to the DocBook stylesheets whenever there's a 
new 'current' release.

A root /etc/xml/catalog includes local catalogs for various 'packages'


-- /etc/xml/catalog
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC 
  "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
  "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";>
<catalog
  xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
  prefer="public">
...
<nextCatalog catalog="oasis_docbook.xml"/>
...
</catalog>
--


Each local 'package' catalog delegates to a number of related DTDs, schema 
and stylesheets:


-- /etc/xml/oasis_docbook.xml
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC 
  "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
  "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd";>
<catalog
  xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
  prefer="public">
  <group
    prefer="public"
    xml:base="file:///usr/share/xml/">
...
    <!-- DocBook XSL 
    -->
    <delegateSystem 
      systemIdStartString="http://docbook.sourceforge.net/release/xsl/";
      catalog="docbook.sorceforge.net/release/xsl/catalog.xml"/>
    <delegateURI 
      uriStartString="http://docbook.sourceforge.net/release/xsl/";
      catalog="docbook.sorceforge.net/release/xsl/catalog.xml"/>
...
  </group>
</catalog>
--


xml:base="file:///usr/share/xml/" points to the root of a mirror
of canonical URLs. At appropriate places, local catalogs take over
and do the final resolution, based on an entity declared in an external 
entity:


-- current
<!ENTITY current "1.62.0">
--

-- catalog.xml
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC 
  "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" 
  "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"; [
  <!ENTITY % current SYSTEM "current">
  %current;
  ]>
<catalog
  xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
  prefer="public">
  <rewriteSystem 
    systemIdStartString="http://docbook.sourceforge.net/release/xsl/current";

    rewritePrefix="&current;"/>
  <rewriteURI 
    uriStartString="http://docbook.sourceforge.net/release/xsl/current"; 
    rewritePrefix="&current;"/>
  <rewriteSystem
    systemIdStartString="http://docbook.sourceforge.net/release/xsl"; 
    rewritePrefix=""/>
  <rewriteURI 
    uriStartString="http://docbook.sourceforge.net/release/xsl"; 
    rewritePrefix=""/>
</catalog>
--


We need to run native Windows, Cygwin, as well as Linux based 
applications and don't want to maintain separate entity resolution 
mechanism for each application. Windows and Linux applications 
can share files through a Samba share.

In /etc/xml/oasis_docbook.xml, "file:///usr/share/xml/" could
of course also be substituted by an entity declared in an
external entity. It should somehow get declared in a way that 
depends on the needs of each application; some native Windows 
applications get along fine with POSIX pathnames, and some don't. 

There's an additional twist to this: some applications like 
to populate the directory in which a DTD is located with 
application-specific files. These files often depend on the version 
of the application; you know the problem if you need to be able 
to run Epic 4.3 and 4.4 simultaneously.

So, I'm trying to design a nice and simple scheme (ha ha) so 
that

1) local changes have local effects
2) global changes are not required for local effects
3) resources are managed according to each their own lifecycle
4) different versions of different applications can have
   each their own private space attached to common resources
5) different expectations wrt. filenames can be met


kind regards
Peter Ring


-----Original Message-----
From: Rob Lugt [mailto:roblugt@elcel.com]
Sent: 23. oktober 2003 21:08
To: csalter@ca.ibm.com; entity-resolution-comment@lists.oasis-open.org
Subject: Re: [entity-resolution-comment] Public Comment


I don't know about a recommended approach, but there are a number of things
you could try:-

1)  If you are sharing the catalog on a windows network, try using UNC paths
instead of drive mapping.  e.g.
<uri name="http://www.oasis-open.org/committees/docbook/";
   uri="file://<host>/<share>/file"/>

2)  Consider using relative URIs in your catalog.  If I remember rightly,
these should resolve relative to the catalog file in which they appear.
e.g.
<uri name="http://www.oasis-open.org/committees/docbook/";
   uri="docbook/"/>

3) Following on from your idea of putting file locations in another file,
such as mechanism already exists in XML, so you can use that.  e.g.

<!DOCTYPE catalog [
<!ENTITY % files SYSTEM "file-locations.ent">
%files;
]>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="http://www.oasis-open.org/committees/docbook/";
   uri="&PROJECT_INSTALL_LOCATION;/docbook/"/>
</catalog>

Best regards
Rob Lugt
ElCel Technology
http://www.elcel.com/

----- Original Message ----- 
From: <comment-form@oasis-open.org>
To: <entity-resolution-comment@lists.oasis-open.org>
Sent: Wednesday, October 22, 2003 11:27 PM
Subject: [entity-resolution-comment] Public Comment


> Comment from: csalter@ca.ibm.com
>
> What's the recommended approach for sharing xml catalogs that have
concrete file system locations in them?  For example, I have a catalog with
several entries like this...
>
> <uri name="http://www.oasis-open.org/committees/docbook/";
>           uri="file:///D:/projects/oasis/docbook/website/"/>
>
> Now I want to use this catalog on another machine where the 'project'
directory is installed on the 'E:' drive.  So I'm assuming one would need
some thing like this...
>
> <rewriteURI uriStartString="file:///D:/project/"
>             rewritePrefix="file:///E:/project/"/>
>
> It seems to me it would be nice to have some convention when specifying
file system URIs so that they can be easily 're-mapped' to actual drive
names (and to make it clear at a glance where these substitutions are
intended).   For example...
>
> <uri name="http://www.oasis-open.org/committees/docbook/";
>           uri="/PROJECT_INSTALL_LOCATION/oasis/docbook/website/"/>
>
> <rewriteURI uriStartString="/PROJECT_INSTALL_LOCATION"
>             rewritePrefix="file:///E:/project/"/>
>
> The next logical step would be to put move the rewrites containing the
'actual' file locations into a separate catalog file.  That way the 'main'
catalog could be shared in a team repository and wouldn't need to be edited.
Only the small catalog containing rewrites to 'actual' file locations would
ever need to be customized.
>
> Any comments/suggestions ?
>
> To unsubscribe from this list, send a post to
entity-resolution-comment-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.
>
>


To unsubscribe from this list, send a post to
entity-resolution-comment-unsubscribe@lists.oasis-open.org, or visit
http://www.oasis-open.org/mlmanage/.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]