[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: SGML/XML Policy Group - XML Catalog Update



On , January 18, Adam DiCarlo wrote:
> 
> > > Putting proper XML valid as SGML stuff into only in /usr/share/xml is
> > > going to break the ability to process XML with the SGML toolchain
> > > (jade,sp,etc etc).
> > 
> > I disagree. Jade, et al, don't care where things are. SGML/XML
> > resources are located using the existing SGML (aka TR9401) catalog
> > system. If the "XML valid as SGML stuff" is also registered with the
> > SGML catalog system there shouldn't be any problem whatsoever. 
> 
> Hmmm.  Is this true?  

Yep. Way.

> Have you tried it?

Yep. Works like crazy, too. In fact, I make use of this feature on a
daily basis.

You see, I have my own personal version of xml-base that includes the
DTD for XML Catalogs...

Here's a working example from my xml-base package: 

a. I put the XML Catalog DTD and its accompanying SGML catalog in
   /usr/share/xml/dtd/, 

b. added a "Centralized Catalog" /etc/sgml/xml-base.cat, and 

c. registered it in /etc/sgml/catalog.


Here's the contents of /etc/sgml/xml-base.cat:
**********************************************
  -- 
  ## ======================================================================
  ## /etc/sgml/xml-base.cat : SGML centralized catalog
  ## ======================================================================
  ## Please use update-catalog(8) to modify this file.
  ## ======================================================================
  --
  
  CATALOG "/usr/share/xml/dtd/catalog"
  DOCTYPE catalog "/usr/share/xml/dtd/catalog.dtd"

**********************************************

Now, when I fire up emacs to edit an xml catalog, nsgmls has no problem
finding the XML Catalog DTD. It uses the DOCTYPE directive to find
it. 

Here's the entity lookup log:
*******************************************************************
Start looking for dtd entity catalog public -//OASIS//DTD XML Catalogs V1.0//EN// system http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd
  catalog: /etc/sgml/catalog exists
  catalog: /etc/sgml/xml-base.cat exists
  >> /usr/share/xml/dtd/catalog.dtd [by doctype catalog]
*******************************************************************

And finally, here's the relevant part of the xml catalog file I'm
editing:
***************************************************************
  <?xml version="1.0"?>
  <!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs 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">

   [...catalog stuff...]

  </catalog>
***************************************************************

I kid you not, this works just fine. Location of resources doesn't
matter, so long as the location is contained in the catalog that is
parsed.

I'm surprised that you find this surprising:)

Whattya think of that?

Mark
-- 
_____________________________________
Mark Johnson        <mark@duke.edu>
Debian XML/SGML     <mrj@debian.org>
Home Page:          <http://dulug.duke.edu/~mark/>
GPG fp: 50DF A22D 5119 3485 E9E4  89B2 BCBC B2C8 2BE2 FE81



Reply to: