xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18603] New: - return value of ItemPSVI function "String getSchemaDefault()"
Date Wed, 02 Apr 2003 09:24:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18603>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18603

return value of ItemPSVI function  "String getSchemaDefault()"  

           Summary: return value of ItemPSVI function  "String
                    getSchemaDefault()"
           Product: Xerces2-J
           Version: 2.4.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XML Schema Structures
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: carla@x-hive.com


The bug applies to attributes with a global attribute declaration with default 
value.

Calling psvi function "getSchemaDefault()" of an attribute with a value that is 
not specified by its schema returns the string value of object ValidatedInfo 
(i.e. "org.apache.xerces.impl.dv.ValidatedInfo@d24e3f") 

The following document and schema can be used to reproduce the bug.


default.xml:
<?xml version="1.0"?>
<items xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="default.xsd">
  <item defaultAttributeGlobal="DAG" defaultAttributeLocal="DAL">
    <defaultElement>DE</defaultElement>
  </item>
  <item>
    <defaultElement></defaultElement>
  </item>
</items>

default.xsd:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
 <xsd:element name="items">
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element ref="item" minOccurs='1' maxOccurs='unbounded'/>
     </xsd:sequence>
    </xsd:complexType>
 </xsd:element> 
 <xsd:attribute name="defaultAttributeGlobal" type="xsd:string" default="***"/>
 <xsd:element name="item">
   <xsd:complexType>
     <xsd:sequence>
       <xsd:element name="defaultElement"  type="xsd:string" default="***"/>
     </xsd:sequence>
     <xsd:attribute name="defaultAttributeLocal" type="xsd:string" 
default="***"/>
     <xsd:attribute ref="defaultAttributeGlobal"/>
   </xsd:complexType>
 </xsd:element>
</xsd:schema>



The output is reproduced by calling "getSchemaDefault" of 
attribute "defaultAttributeGlobal" of the first "item" element.


Question: the "getSchemaDefault" return value of 
attribute "defaultAttributeLocal" is null when the attribute value is not 
specified by the schema. Is this correct?


Carla Spruit

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


Mime
View raw message