[Xml-compile] unique constraint not validating

Mark Overmeer mark at overmeer.net
Mon Feb 6 08:52:09 GMT 2012


* ml at usermode.de (ml at usermode.de) [120206 07:06]:
> >>http://grokbase.com/t/sc/xml-compile/085f2pr9yf/xml-compile-schema-validation-on-xs-id-has-problem
> >
> >Totally unrelated.
> 
> "Totally"? Dunno. At least it's about unique identifiers..

The xsd:ID is a type which can be validated with a regular expression
matching a string.

The xsd:unique in the schema is logic: like a small program which needs
to be run to check a message for things that the are not doable in
the structural definition features provided by the rest of the schema
specification.

> Maybe you like to put this also into documentation, because it
> states now:
> 
> "On the other hand, the processed data is strictly validated against
> the schema: both input and output will follow the specs closely
> (unless disabled)."

Maybe too strongly stated.  On purpose, I ignored unique/fields/selector,
as info for databases only.  Maybe I have to change my decission on that.

> Which version of the XML Schema Spec is supported by XML::Compile?
> Which schema features are not implemented?

The "new" schema standard under development (which everyone is
already using) recently got this feature
   http://www.w3.org/TR/xmlschema11-1/#cTypeAlternative
I have seen a few cases where new features got removed again, so as long
as I have not encountered the new trick in the wild, I'll not spend time
on it.

Ignored are currently:
  assert, report, unique, key, keyref, notation, annotation

I do not trust the information from include and import (more often
wrong than right), so you have to explicitly load those additional
schema's.  You need to specify xsi:type usage explicitly, otherwise
the handler can not compile itself.
-- 
Regards,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net




More information about the Xml-compile mailing list