xsl-list
[Top] [All Lists]

Re: xsi:schemaLocation

2004-08-31 13:05:01
<Blog xmlns="http://tempuri.org/Blog.xsd";>

The Blog element belongs to http://tempuri.org/Blog.xsd namespace.

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:myns="http://tempuri.org/Blog.xsd";>
<xsl:template match="myns:Blog">...

The template matches the Blog element from the http://tempuri.org/Blog.xsd
namespace.

<Blog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://limpens.com/blog
http://localhost/LimpensCom/webXML/Data/BlogSpy.xsd";>

Here the Blog element is in no namespace so it will not be matched by your
template.

From how you associated the schema it seems you expect in this case to have
the Blog element in the http://limpens.com/blog namespace so you might
consider changing your files to use the same namespace.

Hope that helps,
George
-------------------------------------------------------
George Cristian Bina mailto:george(_at_)oxygenxml(_dot_)com
<oXygen/> XML Editor and XSLT Editor/Debugger
http://www.oxygenxml.com/


----- Original Message -----
From: "Jan Limpens" <jan(_dot_)limpens(_at_)gmail(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, August 31, 2004 10:40 PM
Subject: [xsl] xsi:schemaLocation


hi,

i've gout a xsd -> xml -> xsl -> html chain
when i use

xml:
<?xml version="1.0" encoding="utf-8"?>
<Blog xmlns="http://tempuri.org/Blog.xsd";>
<BlogInfo lang="de">...

with xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:myns="http://tempuri.org/Blog.xsd";>
<xsl:template match="myns:Blog">...

everything is fine. but when my xml looks like

<?xml version="1.0" encoding="UTF-8"?>
<Blog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://limpens.com/blog
http://localhost/LimpensCom/webXML/Data/BlogSpy.xsd";>
<BlogInfo lang="de">...

it doesn't. What am I supposed to do? I guess it's the
xsi:schemaLocation, but this does not help me too much...

thanks!

--
Jan Limpens
http://www.limpens.com

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




<Prev in Thread] Current Thread [Next in Thread>