Re: [xsl] xsi:schemaLocation

Subject: Re: [xsl] xsi:schemaLocation
From: Jan Limpens <jan.limpens@xxxxxxxxx>
Date: Tue, 31 Aug 2004 17:28:48 -0300
probably its better to include the entire files, to make things clearer....

the xml
<?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">
		<BlogTitle>Illustrationen</BlogTitle>
		<BlogDescription>Das ist eine Auflistung aller Arbeiten, die ich in
den letzten Jahren als Illustrator machen konnte.</BlogDescription>
	</BlogInfo>
	<Entry>
		<PubDate>1996-01-15T00:00:00</PubDate>
		<Category domain="Limpens.com">Illustration</Category>
		<Image>NorthernLights.jpg</Image>
		<Link>NorthernLights.aspx</Link>
		<Version lang="pt">
			<Guid isPermaLink="false">111</Guid>
			<Title>Capa Northern Lighs</Title>
			<Description>
				<Para>Esta Capa foi o meu primeiro trabalho comercial na area
grafica.</Para>
			</Description>
		</Version>
		<Version lang="de">
			<Guid isPermaLink="false">111</Guid>
			<Title>Cover Northern Lights</Title>
			<Description>
				<Para>Dieses Cover war meine erste Arbeit auf dem Gebiet der
Grafik.</Para>
			</Description>
		</Version>
	</Entry>
	<Entry>
		<PubDate>1997-01-15T00:00:00</PubDate>
		<Category domain="Limpens.com">Illustration</Category>
		<Image>Balance.jpg</Image>
		<Link>Balance.aspx</Link>
		<Version lang="pt">
			<Guid isPermaLink="false">111</Guid>
			<Title>Capa Balance Of The Force LP</Title>
			<Description>
				<Para>Uma outra capa para o musico vienense Waldeck.</Para>
			</Description>
		</Version>
		<Version lang="de">
			<Guid isPermaLink="false">111</Guid>
			<Title>Cover Balance Of The Force LP</Title>
			<Description>
				<Para>Das zweite Cover f|r den Wiener Szene Act Waldeck.</Para>
			</Description>
		</Version>
	</Entry>
</Blog>


and the 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://limpens.com/blog";>
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:template match="myns:Blog">
		<div id="Blog">
				<xsl:apply-templates select="myns:BlogInfo"/>
				<xsl:apply-templates select="myns:Entry"/>
		</div>
	</xsl:template>
	<xsl:template match="myns:BlogInfo">
			<h1><xsl:value-of select="myns:BlogTitle"/></h1>
			<div id="DivIntro">
				<xsl:value-of select="myns:BlogDescription"/>
			</div>
	</xsl:template>
</xsl:stylesheet>

with not working I meant, the output was all values, unformatted, the
default transormation. so the xsl never matched the myns:Blog element.
What are the nessary changes to the xsl file for the transformation to
work?

fyi: the whole problem arises with xmlspy, which i would like to use
for editing. it needs the xsi:schemaLocation attribute in the xml file
to be able to find the scheme and validate against it. in visual
studio, all that's necessary is
xmlns="http://tempuri.org/Schemafile.xsd";, but visual studio is not as
userfriendly for editing tree-like content.

cheers & thanks
j.

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

Current Thread