[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Retriving a value of default attribute from schema(.xs
Hi there, while parsing an xml file using xml schema as validator for that file, the default value declared for a particular attribute is not been picked up by the parser. while the code works fine with the dtd. As a result the java source code returns null pointer exception. the schema structure for the element ' fromTable ' is as follows : <xs:complexType name="fromTableType"> <xs:sequence> <xs:element name="table" type="tableType" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>Unique Table </xs:documentation> </xs:annotation> </xs:element> </xs:sequence> <xs:attribute name="joinType" default="equi"> <xs:simpleType> <xs:restriction base="xs:NMTOKEN"> <xs:enumeration value="equi"/> <xs:enumeration value="nonequi"/> <xs:enumeration value="join"/> <xs:enumeration value="LeftOuterJoin"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="primaryTable" type="xs:string"/> <xs:attribute name="alias" type="xs:string"/> </xs:complexType> The parser I am using is xerces.jar in the package XML4J-J-bin.3.2.1. Does this parser support validation of XML against XSD??? If yes, to what level??? The default vlaue "equi" is not getting picked up by the parser. Is there any other field I have to include in attribute element???? Thanx in advance :-) Vadiraj XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|