Re: [xsl] xsl/xml

Subject: Re: [xsl] xsl/xml
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 7 May 2002 16:51:08 -0600 (MDT)
Simon Choy wrote:
> <country xmlns="";>
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> <member>bob</member>
> </country>

Your source document has both 'country' and 'member' in the 
'' namespace. 

I dearly hope the choice of namespace URI is arbitrary and
that you aren't really trying to parse HTML.

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

You're asking for elements named 'member' in no namespace,
that are children of elements named 'country' in no namespace.

What you want is:

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

and so on.

   - Mike
  mike j. brown                   |  xml/xslt:
  denver/boulder, colorado, usa   |  resume:

 XSL-List info and archive:

Current Thread