[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl/xml

Subject: Re: xsl/xml
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 7 May 2002 16:51:08 -0600 (MDT)
html country select
Simon Choy wrote:
> <country xmlns="http://www.w3.org/TR/html4/">
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> <member>bob</member>
> </country>

Your source document has both 'country' and 'member' in the 
'http://www.w3.org/TR/html4/' 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="http://www.w3.org/1999/XSL/Transform"
> 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"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:html="xmlns="http://www.w3.org/TR/html4/">
>
  <xsl:template match="/">
    <html>
      <body>
        <xsl:value-of select="html:country/html:member" />

and so on.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • xsl/xml
    • Simon Choy - Tue, 7 May 2002 18:27:05 -0400 (EDT)
      • Mike Brown - Tue, 7 May 2002 18:44:50 -0400 (EDT) <=
      • Stuart Celarier - Tue, 7 May 2002 18:52:06 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.