ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> xml-dev
xml-dev
RE: [xml-dev] XML Schema - > XML Instance - > XSLT Transformation with MSXML 4 ?
by Manos Batsis other posts by this author
Feb 26 2002 9:56AM messages near this date
RE: [xml-dev] MS thinks HTTP Needs Replacing??? | RE: [xml-dev] MS thinks HTTP Needs Replacing???
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@[...].de] 
>  Sent: Tuesday, February 26, 2002 11:34 AM
>  To: 'xml-dev@lists.xml.org'
>  Subject: [xml-dev] 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@[...].de 
>  ----
>  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>
>  
>  

-----------------------------------------------------------------
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> 

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved