[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Creating a single XML vocabulary that is appropriatelycust
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 !
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|