You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by xe...@xml.apache.org on 2004/10/04 09:48:33 UTC

[jira] Closed: (XERCESC-1197) Validation of anyType elements fail when XML attributes present

Message:

   The following issue has been closed.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1197

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1197
    Summary: Validation of anyType elements fail when XML attributes present
       Type: Bug

     Status: Closed
   Priority: Major
 Resolution: FIXED

    Project: Xerces-C++
 Components: 
             Validating Parser (Schema) (Xerces 1.5 or up only)
   Versions:
             2.5.0

   Assignee: 
   Reporter: Scott Cantor

    Created: Thu, 15 Apr 2004 8:17 AM
    Updated: Mon, 4 Oct 2004 12:47 AM
Environment: Bug present on at least Windows XP, Solaris 2.8, and RH Linux 7/9

Description:
2.5 (and pretty much any other version) doesn't permit arbitrary XML
attributes to show up on an element declared as anyType.

This is incorrect behavior, as far as I understand it.

The interesting (and really weird) thing is that if you derive your own type from anyType and add nothing, that new type *does* permit arbitrary attributes to show up.

Schema snip:
<element name="Thing" type="anyType">

Example that fails validation complaining about Scope attribute:
<Thing Scope="foo">member</Thing>

Schema fix:
<element name="Thing" type="myType">
<complexType name="myType">
    <complexContent>
        <extension base="anyType"/>
    </complexContent>
</complexType>

I'm pretty sure that either both schemas should validate or invalidate that example, but not one yes, one no. And I think the correct behavior is that it should validate in both cases. Xerces-J behaves accordingly.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org