W3C home > Mailing lists > Public > public-i18n-its@w3.org > January to March 2006

Re: DocBook and ITS

From: Jirka Kosek <jirka@kosek.cz>
Date: Thu, 16 Mar 2006 11:03:28 +0100
Message-ID: <441937F0.1070304@kosek.cz>
To: Sebastian Rahtz <sebastian.rahtz@oucs.ox.ac.uk>
Cc: Felix Sasaki <fsasaki@w3.org>, public-i18n-its@w3.org
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:43:06 UTC