Re: [xml-dev] Creating a single XML vocabulary that is appropriately customized to different sub-groups within a community

From
Philippe Poulard <>
To
"Costello, Roger L." <>
Date
2008-07-10T08:51:15Z
ID
<>
Thread
Re: [xml-dev] Creating a single XML vocabulary that is appropriately customized to different sub-groups within a community
Costello, Roger L. a écrit :
> ---------------------------------------------------------
> book.rng
> ---------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <element name="Book" xmlns="http://relaxng.org/ns/structure/1.0"
>          ns="http://www.books.org">
>       <optional><element name="Title"><text/></element></optional>
>       <optional><element name="Author"><text/></element></optional>
>       <optional><element name="Date"><text/></element></optional>
>       <optional><element name="ISBN"><text/></element></optional>
>       <optional><element name="Publisher"><text/></element></optional>
>       <optional><element name="Size"><text/></element></optional>
>       <optional><element name="Weight"><text/></element></optional>
>       <optional><element
> name="MailingCost"><text/></element></optional>
>       <optional><element name="NumPages"><text/></element></optional>
> </element>

I think there are less difficulties in your examples than you expect.
Are you sure that you can't design a RelaxNG schema that express all 
your constraints ? (I'm not a RelaxNG expert so if you say that the 
above schema is the best that can be done, I will believe you)
Or did I miss anything else :) ?

Anyway, ASL can be good for example if you change some elements to 
attributes : you can express a content model that mix attributes (or 
even attributes with a specific values) with elements. I know that 
sometimes it is possible with other schema technologies, but I also know 
that there are lots of things that can't be done with RelaxNG or W3C XML 
Schema but that are possible with ASL.

I remember, Roger, some examples you posted few months ago about 
co-occurrence constraints and algorithmic validations ; they were 
examples that can't be done with RelaxNG or W3C XML Schema, and I wrote 
the actual schemas with ASL :
http://reflex.gforge.inria.fr/tutorial-schemas.html

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !