RE: [xsl] xsl/xml

Subject: RE: [xsl] xsl/xml
From: "Stuart Celarier" <stuart@xxxxxxxxxxx>
Date: Tue, 7 May 2002 15:57:47 -0700
Simon, in your XML file you've used a default namespace (a namespace
without a prefix specified) on the top level element. That means that
<country> and <member> elements are in the namespace associated with the
URI "";. Your XSLT file is looking for
<country> and <member> elements that belong to no namespace. Specifying
the namespace these elements will probably fix your problem.

<xsl:stylesheet xmlns:xsl="";
version="1.0" xmlns:a1="";>
<xsl:template match="/">
		<xsl:value-of select="a1::country/a1::member" />	

That said, ""; is an exceedingly poor choice
of namespace URI for your custom <country> and <member> element. I am
sure that is not what you mean. Instead, leave the default namespace
declaration out of the XML file entirely, it does not contain any HTML 4


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Simon Choy
Sent: Tuesday, May 07, 2002 15:33
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] xsl/xml

First of all thank you for all your help last time guys
Staring at the screen too long makes me blind

anyway I have a new question

XML file:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="database.xsl"?> 
<country xmlns="";>

XSL file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="";
<xsl:template match="/">
		<xsl:value-of select="country/member" />	

	The line <xsl:value-of select="country/member" /> within the XSL
file does not show anything. I have narrowed it down the the namespace
attribute in the XML file that's causing this problem. If i remove the
Namespace attribute from the <country> element, it prints it out fine

ps. this is a simplified version of what I am working on, and in my
the namespace attribute of the root element cannot be removed.

Is there anyway to get around thhis?


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread