[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

Subject: Retriving a value of default attribute from schema(.xsd)
From: "Vadiraj" <Vadirajrk@xxxxxxxxxx>
Date: Fri, 12 Oct 2001 12:40:52 +0530
xs enumeration default
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.