Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change 
notification.

The following page has been changed by assertions:
http://wiki.apache.org/xerces/XML_Schema_1%2e1_Assertions

------------------------------------------------------------------------------
  
  This page describes implementation details of XML Schema 1.1 assertions 
feature, in [http://xerces.apache.org/xerces2-j/ Xerces-J] XML parser.
  
- '''Status of assertions development:''' Assertions support for Simple Type 
definitions is complete, and Xerces team has checked in the code for this, at 
the SVN repository 
(https://svn.apache.org/repos/asf/xerces/java/branches/xml-schema-1.1-dev/). 
Assertions support for Complex Type definitions is also complete, and the 
review is pending from the Xerces team. A change will be likely in the Complex 
Type assertions support, due to a pending grammar issue with the XML Schema WG.
+ '''Status of assertions development:''' Assertions support for Simple Type 
definitions is complete, and Xerces team has checked in the code for this, at 
the SVN repository 
(https://svn.apache.org/repos/asf/xerces/java/branches/xml-schema-1.1-dev/). 
Assertions support for Complex Type definitions is also complete, and the 
review is pending from the Xerces team.
  The XPath 2.0 processing for assertions is yet to be written.
  
  '''Assertions usage in Complex Types (as defined in the XML Schema 1.1 
spec)'''
@@ -36, +36 @@

     base = QName
     id = ID
     {any attributes with non-schema namespace . . .}>
-    Content: (annotation?, (simpleType?, (minExclusive | minInclusive | 
maxExclusive |  maxInclusive | totalDigits | fractionDigits | maxScale | 
minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern 
| '''assert''' | {any with namespace: ##other})*)?, ((attribute | 
attributeGroup)*, anyAttribute?), '''assert'''*)
+    Content: (annotation?, (simpleType?, (minExclusive | minInclusive | 
maxExclusive |  maxInclusive | totalDigits | fractionDigits | maxScale | 
minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern 
| '''assertion''' | {any with namespace: ##other})*)?, ((attribute | 
attributeGroup)*, anyAttribute?), '''assert'''*)
   </restriction>
  
   <extension
@@ -83, +83 @@

    base = QName
    id = ID
    {any attributes with non-schema namespace . . .}>
-   Content: (annotation?, (simpleType?, (minExclusive | minInclusive | 
maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale | 
minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern 
| '''assert''' | {any with namespace: ##other})*))
+   Content: (annotation?, (simpleType?, (minExclusive | minInclusive | 
maxExclusive | maxInclusive | totalDigits | fractionDigits | maxScale | 
minScale | length | minLength | maxLength | enumeration | whiteSpace | pattern 
| '''assertion''' | {any with namespace: ##other})*))
  </restriction>
  
  '''Design approach'''
  
  XSModel is modified to handle the new 'assert' feature, for the XML Schema 
1.1 Simple and Complex types.
  
- Since 'assert' now is a new Facet, to implement asserts for Simple Types, the 
current Facets data structures, and the Facet traverser are enhanced to support 
XML Schema 1.1 assertions.
+ Since 'assertion' now is a new Facet, to implement asserts for Simple Types, 
the current Facets data structures, and the Facet traverser are enhanced to 
support XML Schema 1.1 assertions.
  
  To implement asserts for Complex Types, the Complex Type traverser of Xerces 
is modified.
  
  '''Open issues'''
  
   1. XPath 2.0 processing for ''test'' attributes of xs:assert elements is not 
yet written. The current implementation of xs:assert elements would return true 
for any value of ''test'' attribute. There might be possibility to reuse some 
of the XPath 2.0 processing code, from XML Schema 1.1 Type alternative 
component, which would be explored.
-  1. In the Schema grammar above, there is a problem with 'assert' facet in 
Complex Types with Simple Content. It's not possible to distinguish between the 
'assert' facet and the 'assert' element of the Complex Type.[[BR]]This issue is 
pending with the XML Schema WG, and it might be possible, that 'assert' facet 
might get removed from Complex Types with Simple Content, or be renamed to 
something like, 'assertFacet'.
  
  
  ----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to