Thank you for these examples.
On Sat, Apr 19, 2014 at 7:38 PM, Graydon <graydon(_at_)marost(_dot_)ca> wrote:
On Sat, Apr 19, 2014 at 06:42:01PM -0700, Dimitre Novatchev scripsit:
To put it in other words: Why was the xs:error type introduced (in
XML Schema)? What purpose does it serve? What problems does it solve?
http://lists.w3.org/Archives/Public/xmlschema-dev/2009Jul/0045.html (and
the rest of the thread) may be of interest.
xs:error would appear to be a result of conditional type assignment and
to allow
<element name="element" type="element">
<alternative test="@name" type="localElement"/>
<alternative test="@ref" type="elementRef"/>
<alternative type="error"/>
</element>
as a way to define the schema "element" element, so that it must have a
name or a ref. This is not something XSD 1.0 would allow.
There's also a case where you're using subset V of large shared
vocabulary P, and want to forbid element E in V when it is optional in P;
<override schemaLocation="main.path.to.V">
<element name="E" type="error"/>
<!--* other elements can be excluded here by the same method ... *-->
</override>
That thread also has the cheerful acknowledgement that anything you can
do in XSD 1.1 with xs:error you can also do with assertions, but
xs:error is preferred for style and legibility.
-- Graydon
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--