Allow setting flexible="true" and ordered="false" at the same time
------------------------------------------------------------------

                 Key: JIBX-397
                 URL: http://jira.codehaus.org/browse/JIBX-397
             Project: JiBX
          Issue Type: New Feature
          Components: core
    Affects Versions: JiBX 1.2.2
            Reporter: Archie Cobbs


Currently, setting flexible="true" on a <structure> element is limited to 
situations in which ordered="false".

First, I don't understand why this restriction is necessary. Why is it any
harder to ignore unknown elements in the ordered case than in the unordered
case? Can't you just ignore them?

Secondly, this makes JiBX useless on some very common and important use
cases: XML schemas that allow arbitrary nested elements from other
namespaces.

For example, any schema that has ordered elements plus one of these in it:

  <xsd:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>

If you want to write a parser that accepts any valid document adhering to
such a schema, you need to be able to have your parser automatically ignore
the nested stuff from other namespaces that you don't recognize. This is a
common pattern in XML documents to allow independent parties to
independently define extensions that are automatically (a)
backward-compatible and (b) don't conflict. But there doesn't seem to be a
way to accomplish this with JiBX when the namespace="##other" element(s)
appear among an ordered set of elements.

JiBX utility would therefore be improved if flexible="true" and ordered="false"
could be set at the same time.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to