[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML Schema - > XML Instance - > XSLT Transformation with
What you are asking this is easy and you may have used it before: var xmlDomObj = new ActiveXObject("MSXML2.DOMDocument.4.0"); xmlDomObj .async = false; xmlDomObj .validateOnParse = true; // <-- validate (default is true) xmlDomObj .load("instance.xml"); if (xmlDomObj .parseError.errorCode != 0) // Handle error else // continue You can also associate an instance with a schema through the read/write schemas property [1]. I prefer a more convenient and standard method to do the association by using the xsi:schemaLocation attribute in the instance document. [1] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/ htm/xml_pro_sz_3i5h.asp Cheers, Manos > -----Original Message----- > From: Braumuller, Hans [mailto:h.braumueller@h...] > Sent: Tuesday, February 26, 2002 11:34 AM > To: 'xml-dev@l...' > Subject: XML Schema - > XML Instance - > XSLT > Transformation with MSXML 4 ? > > > Hello, > > this is my first post at this list. I am working daily as > webdesigner at > Hanse Orga, Germany and being a visual artist engage in > networking art and > poetry. As webdesigner i am developing the XML/XSL/CSS/JS > User-Interface. > > What we are doing at Hanse Orga is developing a financial > software, where we > used xml as a bridge between our backend programmed with COM and our > frontend developed with XSLT, which transformed the > XML-String passed by our > ServletEngine (Java) into XHTML combined with CSS and > Javascript. Javascript > we use for some validations at the client side (IE6). This is > a workaround, > because our business logic written in Centura/Gupta exists > since many years > on a windows client/server system. > > My first key question is, that i want try to include the XML > Schema linking > it with my XML Instance String, which are transformed with > XSLT in the above > mentionred output. > I know now, that MSXML 4 support the whole W3 Recommendation > of XML Schema. > Can anyone supplies a working example, how to link this three > document on > the client side? > > Secondly, from that point i want test, if it is possibly to do some > validation on the client side, to see if i can validate > against the schema > by checking the user input, instead of using complicated > javascripts. I > imagine for example, if some user put a not valid date format > in an input > field, an alert box pops up with the message "This is not a valid date > format" . Is this possible to generate with XML Schema ? Or > is XML Schema > designed in mind for software agents, valid data exchange and > documentation > purpose only ? > > Thank you, > > Hans Braumuller > Systementwickler Web-Design > Hanse Orga AG > Sportallee 41 > D-22335 Hamburg > Telefon: (+49) 040 51 48 08-62 > Telefax: (+49) 040 51 48 08-88 > E-Mail: h.braumueller@h... > ---- > Private > http://crosses.net > http://kunstserie.com > ---- > > > > ----------------------------------------------------------------- > The xml-dev list is sponsored by XML.org <http://www.xml.org>, an > initiative of OASIS <http://www.oasis-open.org> > > The list archives are at http://lists.xml.org/archives/xml-dev/ > > To subscribe or unsubscribe from this list use the subscription > manager: <http://lists.xml.org/ob/adm.pl> > >
|
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
|