[dsdl-comment] Re: Schema rewriting for attribute sections (NVDL)

From: Jirka Kosek <jirka@kosek.cz>
Date: Tue Sep 18 2007 - 07:10:07 UTC

MURATA Makoto wrote:
> 8.7.3 of 19757-4 mandates schema rewriting for RELAX NG.
>
> For each (v, e) in PlanAtt, the NVDL dispatcher writes the
> schema g in v. If g is written in RELAX NG, g is rewritten as
> <element><anyName/>g</element>. If g is written in some other
> schema language and that schema language provides a schema
> rewriting mechanism for NVDL, g is rewritten by applying that
> mechanism. Otherwise, g is not rewritten.
>
> I heard that oNVDL supports this rewriting, but no other NVDL
> implementations suppor it.

JNVDL is also supporting this.

> One implementor argues that this rewriting
> is hard unless you are willing to manipulate internal representations
> of RELAX NG schemas.
>
> Is this so hard?

I don't think so:

 public static Element rewrite(Element content, String ns) {
        if (ns.equals(RELAX_BG_NS)) {
            Element root = new Element("element", RELAX_BG_NS);
            root.addContent(new Element("anyName", RELAX_BG_NS));
            root.addContent(content.detach());
            return root;
        }
        return null;

    }

So it is not necessary to manipulate *internal representation* of
schema, but do simple transformation of schema on XML/infoset level.
This is of course true only for RELAX NG, for other schema languages
rewrites are going to be more difficult.

> If if is the case, should we try to delete it?

There are schemas out which are already depending on this feature, so I
think it is better to leave feature here. But I have been beaten by this
feature also, see
http://lists.w3.org/Archives/Public/public-i18n-its/2007JulSep/0016.html

I wouldn't miss this feature in NVDL, but as it is already in language
we should keep it to maintain backwards compatibility.

                                Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

--
DSDL comments
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-comment-request@dsdl.org
(mailto:dsdl-comment-request@dsdl.org?Subject=unsubscribe)
Received on Wed Sep 19 11:12:29 2007

This archive was generated by hypermail 2.1.8 : Wed Sep 19 2007 - 09:33:05 UTC