[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: 2: XML Schema - > XML Instance - > XSLT Transformation w

  • To: "Braumuller, Hans" <h.braumueller@h...>
  • Subject: RE: 2: XML Schema - > XML Instance - > XSLT Transformation with MSXML 4 ?
  • From: "Manos Batsis" <m.batsis@b...>
  • Date: Tue, 26 Feb 2002 14:16:08 +0200
  • Cc: "XML DEV" <xml-dev@l...>
  • Thread-index: AcG+uorkDdOgqIlRS6eqlWXTKzazrAAAhGJA
  • Thread-topic: 2: XML Schema - > XML Instance - > XSLT Transformation with MSXML 4 ?

xsi nonamespaceschemalocation xslt


I see no problem with your example.

Since you are using MSXML4, you might want to check [1].
As you probably know,  xsi:schemaLocation is used when your instance document features a namespace, otherwise xsi:noNamespaceSchemaLocation does the trick. Both absolute and relative URLs are allowed.

Your idea on user input validation sounds interesting, but loading DOM objects on the client to perform validation may prove to present a not so useful overhead (especially using script). You will also have to interpret the errors... Still, it may prove useful.

If you come up with something interestingly applicable, or need more help, I'll be around.

[1] http://msdn.microsoft.com/library/en-us/xmlsdk/htm/xsd_devvalidation_8lx0.asp?frame=true

Cheers,

Manos


> -----Original Message-----
> From: "Braumuller, Hans" [mailto:h.braumueller@h...] 
> Sent: Tuesday, February 26, 2002 1:19 PM
> To: 'xml-dev@l...'
> Subject:  2: XML Schema - > XML Instance - > XSLT 
> Transformation with MSXML 4 ? 
> 
> 
> Hello,
> 
> regarding 
> <snip>
> > I prefer a more convenient and standard method to do the 
> > association by
> > using the xsi:schemaLocation attribute in the instance document.
>  </snip>
> 
> Can you please forward an example ?
> 
> I am trying:
> 
> XML Schema:
> 
> <?xml version="1.0"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>             targetNamespace="http://www.books.org"
>             xmlns="http://www.books.org"
>             elementFormDefault="qualified">
> ...
> 
> loading (only for test until IE used MSXML 4 as default) xml and xsl
> 
> test.html
> 
> 	<html>
> 	<head>
> 	<title>Test for dynamic XSL application</title>
> 	</head>
> 	<body>
> 	<div>Document is loading...</div>
> 	<script>
>  	 var xsrc = new ActiveXObject("MSXML2.DOMDocument.4.0");
>  	 xsrc.load("test.xml");
>   	var xstl = new ActiveXObject("MSXML2.DOMDocument.4.0");
>  	 xstl.load("test.xsl");
>  	result.innerHTML = xsrc.transformNode(xstl);
>  	</script>
> 	</body>
> 	</html>
> 
> XML Instance:
> 
> 	<?xml version="1.0"?>
> 	<?xml:stylesheet href="test.xsl" type="text/xsl"?>
> 	<BookStore xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:noNamespaceSchemaLocation="test.xsd">
> 
> XSL Transformation:
> 
> 	<?xml version="1.0" encoding="ISO-8859-1" ?>
> 	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> 
> 
> I guess xsi:noNamespaceSchemaLocation="test.xsd" is a 
> problem, becasue of
> the relative path?
> Can i use /test.xsd instead ? I can type anything, in the 
> path, it don´t
> matters. If it must be a valid uri, how can i handle it on a local
> windows-system or a local webserver ?
> 
> Thanks,
> 
> Hans Braumüller 
> 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!

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.