Re: DocBook and ITS

Sebastian Rahtz wrote:

> The reason why ITS attributes are namespaced is so that they
> can be clearly distinguished in instance documents. This
> then spills over into the <documentRules> stuff.

Yes, I can understand this, but you can have one set of namespaced 
attributes for instances, and second unnamespaced set for documentRules. 
This will allow you to write documentRules as:

  <documentRules xmlns="http://www.w3.org/2005/11/its">
       <ns prefix="db" uri="http://docbook.org/ns/docbook"/>
       <documentRule translate="no" translateSelector="//db:para/@*"/>
       <documentRule translate="yes" translateSelector="//db:para"/>
  </documentRules>

or as:

   <its:documentRules xmlns:its="http://www.w3.org/2005/11/its">
       <its:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
       <its:documentRule translate="no"
                         translateSelector="//db:para/@*"/>
       <its:documentRule translate="yes" translateSelector="//db:para"/>
   </its:documentRules>

which I personally prefer over:

   <its:documentRules xmlns:its="http://www.w3.org/2005/11/its">
       <its:ns its:prefix="db" its:uri="http://docbook.org/ns/docbook"/>
       <its:documentRule its:translate="no"
                         its:translateSelector="//db:para/@*"/>
       <its:documentRule its:translate="yes"
                         its:translateSelector="//db:para"/>
   </its:documentRules>

or if you want to use default namespace:

   <documentRules xmlns:its="http://www.w3.org/2005/11/its"
                  xmlns="http://www.w3.org/2005/11/its">
       <ns its:prefix="db" its:uri="http://docbook.org/ns/docbook"/>
       <documentRule its:translate="no"
                     its:translateSelector="//db:para/@*"/>
       <documentRule its:translate="yes"
                     its:translateSelector="//db:para"/>
   </documentRules>

(yes, this last example looks quite ugly)

I don't see problem with having two sets of attributes. Moreover their 
meaning is quite different. Namespaced attributes define ITS properties 
for the current element, and unnamespaced for elements referenced by 
documentRule.

> The RelaxNG patterns can be generated with a prefix
> by setting the parameter "patternPrefix" to "its."
> when the XSLT script is called.

Cool! Do you think that the next version of WD can have RNG/RNC schemas 
with this change incorporated?

			Jirka

-- 
------------------------------------------------------------------
   Jirka Kosek     e-mail: jirka@kosek.cz     http://www.kosek.cz
------------------------------------------------------------------
   Profesionální školení a poradenství v oblasti technologií XML.
      Podívejte se na náš nově spuštěný web http://DocBook.cz
        Podrobný přehled školení http://xmlguru.cz/skoleni/
------------------------------------------------------------------
                    Nejbližší termíny školení:
      ** XSLT 13.-16.3.2006 ** XML schémata 24.-26.4.2006 **
        ** DocBook 15.-17.5.2006 ** XSL-FO 12.-13.6.2006 **
------------------------------------------------------------------

Received on Thursday, 16 March 2006 10:03:38 UTC