OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   2: XML Schema - > XML Instance - > XSLT Transformation with MSXML 4 ?

[ Lists Home | Date Index | Thread Index ]

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@hanseorga.de 
----
Private
http://crosses.net
http://kunstserie.com
----









 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS