Thanks a lot for the urls. I'm working on them, although my current status
is I'm trying to download the file from an ftp url, and unfortunately, I
can't ftp to the outside world from within our company firewall. So, I guess
I'll have to wait till I get home and do the download from there. If u know
of any other http doenload sites , please let me know. Once again, thanks
for the help......
Thanks,
Kuntal Das
Charles Schwab & Co., Inc.
Wireless Technology
45 Fremont, SF
Email : [EMAIL PROTECTED]
Phone : (415)667-4322
Live life to the brim.................
-----Original Message-----
From: Scott Nichol [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 02, 2001 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: Tried the validator.....
XML Validate from Tibco
(http://www.extensibility.com/solutions/xml_validate/) appears to do what
you need as a commercial product. Turbo XML from Tibco
(http://216.122.205.184/solutions/turbo_xml/) does a number of things, one
of which appears to be validation of XML documents against a schema. It has
a trial download available.
Scott Nichol
----- Original Message -----
From: "Das, Kuntal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 8:19 PM
Subject: Tried the validator.....
> Hi,
> I tried that code and it did seem to validate the schema. But it
> didn't validate the xml document whether it is compling with the schema.
I'm
> sending u the code sample, the xml file and the schema(.xsd). Maybe
that'll
> help. Once again, I don't need a "Schema validator", all I need is a
> validator which will say that this .xml file complies or follows the
> constraints or rules mentioned in the schema(.zsd).
>
>
> ValidateXML.java
> **********************
> import javax.xml.parsers.DocumentBuilderFactory;
> import javax.xml.parsers.DocumentBuilder;
> import org.xml.sax.ErrorHandler;
> import org.xml.sax.InputSource;
> import org.xml.sax.SAXParseException;
> import org.xml.sax.SAXException;
> import org.w3c.dom.*;
>
>
> public class ValidateXML
> {
>
> public static void main(String []a) throws Exception
> {
> try
> {
> DocumentBuilderFactory factory =
> DocumentBuilderFactory.newInstance();
> factory.setValidating(true);
> factory.setNamespaceAware(true);
> MyErrorHandler err = new MyErrorHandler();
> //inherited from org.xml.sax.ErrorHandler
>
>
> DocumentBuilder builder =
> factory.newDocumentBuilder();
> builder.setErrorHandler(err);
>
> Document mydoc = builder.parse(new InputSource
>
>
("file:///C:/experiments/DomesticMobileService/schemas/DataException.xml"));
> }
> catch(SAXException se)
> {
> System.out.println("Caught SAXException : "+se);
> }
> }
> }
>
> class MyErrorHandler implements org.xml.sax.ErrorHandler
> {
> public void warning(SAXParseException exception) throws SAXException
> {
> System.out.println("This is a warning : "+exception);
> }
>
> public void error(SAXParseException exception) throws SAXException
> {
> System.out.println("This is an error : "+exception);
> }
>
> public void fatalError(SAXParseException exception) throws
> SAXException
> {
> System.out.println("This is a fatalError : "+exception);
> }
> }
>
>
> *********************
> Common.xsd
> *********************
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
> targetNamespace="http://pb.schwab.com/schema/common/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns="http://pb.schwab.com/schema/common/"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified">
>
> <!-- enum ExcpSource -->
> <xsd:simpleType name="ExcpSource">
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="MAINFRAME"/>
> <xsd:enumeration value="SENTRY"/>
> <xsd:enumeration value="MIDDLEWARE"/>
> </xsd:restriction>
> </xsd:simpleType>
>
> <xsd:group name="systemExceptionElements">
> <xsd:sequence>
> <xsd:element name="moduleId" type="xsd:string"/>
> <xsd:element name="messageText" type="xsd:string"/>
> <xsd:element name="addtnlText" type="xsd:string"/>
> <xsd:element name="schProcRtrnCd" type="xsd:int"/>
> <xsd:element name="appRtrnCd" type="xsd:int"/>
> <xsd:element name="expSource" type="ExcpSource"/>
> </xsd:sequence>
> </xsd:group>
>
>
> <xsd:complexType name="DataException">
> <xsd:sequence>
> <xsd:group ref="systemExceptionElements"/>
> <xsd:element name="fieldName" type="xsd:string"/>
> <xsd:element name="fldMsg" type="xsd:string"/>
> <xsd:element name="fieldOccurs" type="xsd:positiveInteger"/>
> <xsd:element name="fldMsgCd" type="xsd:positiveInteger"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="SystemException">
> <xsd:sequence>
> <xsd:group ref="systemExceptionElements"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="AccessToken">
> <xsd:sequence>
> <xsd:element name="userID" type="xsd:string"/>
> <xsd:element name="userIDType" type="xsd:string"/>
> <xsd:element name="sessionToken" type="xsd:string"/>
> <xsd:element name="sentryRegion" type="xsd:string"/>
> <xsd:element name="wirelessId" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="AccessTokenEx">
> <xsd:sequence>
> <xsd:element name="userID" type="xsd:string"
> minOccurs="0" maxOccurs="unbounded"/>
> <xsd:element name="sessionToken" type="xsd:string"
> minOccurs="0" maxOccurs="unbounded"/>
> <xsd:element name="userIDType" type="xsd:string"
> minOccurs="0" maxOccurs="unbounded"/>
> <xsd:element name="sentryRegion" type="xsd:string"/>
> <xsd:element name="wirelessId" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="ErrorMessage">
> <xsd:sequence>
> <xsd:element name="errorMessageText" type="xsd:string"/>
> <xsd:element name="errorValue" type="xsd:string"/>
> <xsd:element name="errorMessageId" type="xsd:int"/>
> <xsd:element name="errorMessagePriorityCode"
type="xsd:short"/>
> </xsd:sequence>
> </xsd:complexType>
>
> <xsd:complexType name="SecurityPrice">
> <xsd:sequence>
> <xsd:element name="fractionalString" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
> *****************
> DataException.xml
> *****************
>
> <common:dataException
> xmlns="http://pb.schwab.com"
> xmlns:common="http://pb.schwab.com/schema/common/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNameSpaceSchemaLocation="common.xsd">
>
> <messageText>INVALID PASSWORD</messageText>
> <addtnlText/>
> <schProcRtrnCd>0</schProcRtrnCd>
> <appRtrnCd>9045</appRtrnCd>
> <expSource>SENTRY</expSource>
> <fieldName/>
> <fldMsg/>
> <fieldOccurs>0</fieldOccurs>
> <moduleId/>
> </common:dataException>
>
> ************************************************
>
> Help !!!
>
> Thanks,
> Kuntal Das
> Charles Schwab & Co., Inc.
> Wireless Technology
> 45 Fremont, SF
> Email : [EMAIL PROTECTED]
> Phone : (415)667-4322
> Live life to the brim.................
>
>