[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-dev
Subject:    [jira] [Updated] (XMLSCHEMA-29) An element without "ref" and "type" attributes has not got any assig
From:       "Alexandr Klimov (JIRA)" <jira () apache ! org>
Date:       2013-08-19 13:15:52
Message-ID: JIRA.12664222.1376775025754.89549.1376918152116 () arcas
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/XMLSCHEMA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Alexandr Klimov updated XMLSCHEMA-29:
-------------------------------------

    Description: 
I faced with some trouble when I have tried parse following XSD:
{code:xml}
<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.w3schools.com"
           xmlns="http://www.w3schools.com">

    <xs:complexType name="TestType">
        <xs:sequence>
            <xs:element name="stringElem" type="xs:string"/>
            <xs:element name="dummyElem"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
{code}

A corresponding to *dummyElem* element XmlSchemaElement object has got *schemaType* \
and *schemaTypeName* fields equal *NULL*.

But I'm convinced that in this case \
{noformat}{http://www.w3.org/2001/XMLSchema}anyType{noformat} type should be assigned \
as type of the untyped element. My point of view based on following document: [W3C \
XML Schema Definition Language 1.1 | http://www.w3.org/TR/xmlschema11-1/], point \
3.3.2.1

This *anyType* type is defined in *org.apache.ws.commons.schema.constants.Constants* \
class but I have not found where it is used in any assignment during XSD parsing.

In my opinion, *org.apache.ws.commons.schema.SchemaBuilder#handleElementGlobalType* \
method should contains the third condition branch for a case when *type* and *ref* \
attributes are absent and *anyType* type should be set in the branch.

May be I misunderstand something in a XSD definition and *anyType* type can not be \
assigned in this case?  

Best regards
Alexandr Klimov.   

  was:
I faced with some trouble when I have tried parse following XSD:
{code:xml}
<?xml version="1.0"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.w3schools.com"
           xmlns="http://www.w3schools.com">

    <xs:complexType name="TestType">
        <xs:sequence>
            <xs:element name="stringElem" type="xs:string"/>
            <xs:element name="dummyElem"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>
{code}

A XmlSchemaElement object corresponds to *dummyElem* element has got *schemaType* and \
*schemaTypeName* fields equal *NULL*.

But I'm convinced that in this case \
{noformat}{http://www.w3.org/2001/XMLSchema}anyType{noformat} type should be assigned \
as type of the untyped element. My point of view based on following document: [W3C \
XML Schema Definition Language 1.1 | http://www.w3.org/TR/xmlschema11-1/], point \
3.3.2.1

This *anyType* type is defined in *org.apache.ws.commons.schema.constants.Constants* \
class but I have not found where it is used in any assignment during XSD parsing.

In my opinion, *org.apache.ws.commons.schema.SchemaBuilder#handleElementGlobalType* \
method should contains the third condition branch for a case when *type* and *ref* \
attributes are absent and *anyType* type should be set in the branch.

May be I misunderstand something in a XSD definition and *anyType* type can not be \
assigned in this case?  

Best regards
Alexandr Klimov.   

    
> An element without "ref" and "type" attributes has not got any assigned XSD type \
>                 but should has got "anyType" XSD type.
> -----------------------------------------------------------------------------------------------------------------------
>  
> Key: XMLSCHEMA-29
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-29
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: 2.0.2
> Reporter: Alexandr Klimov
> Labels: anyType
> Attachments: testproj.zip
> 
> 
> I faced with some trouble when I have tried parse following XSD:
> {code:xml}
> <?xml version="1.0"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.w3schools.com"
> xmlns="http://www.w3schools.com">
> <xs:complexType name="TestType">
> <xs:sequence>
> <xs:element name="stringElem" type="xs:string"/>
> <xs:element name="dummyElem"/>
> </xs:sequence>
> </xs:complexType>
> </xs:schema>
> {code}
> A corresponding to *dummyElem* element XmlSchemaElement object has got *schemaType* \
> and *schemaTypeName* fields equal *NULL*. But I'm convinced that in this case \
> {noformat}{http://www.w3.org/2001/XMLSchema}anyType{noformat} type should be \
> assigned as type of the untyped element. My point of view based on following \
> document: [W3C XML Schema Definition Language 1.1 | \
> http://www.w3.org/TR/xmlschema11-1/], point 3.3.2.1 This *anyType* type is defined \
> in *org.apache.ws.commons.schema.constants.Constants* class but I have not found \
> where it is used in any assignment during XSD parsing. In my opinion, \
> *org.apache.ws.commons.schema.SchemaBuilder#handleElementGlobalType* method should \
> contains the third condition branch for a case when *type* and *ref* attributes are \
> absent and *anyType* type should be set in the branch. May be I misunderstand \
> something in a XSD definition and *anyType* type can not be assigned in this case?  \
>  Best regards
> Alexandr Klimov.   

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic