Re: [xsl] XLST newbie needs help

Subject: Re: [xsl] XLST newbie needs help
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 21 Oct 2002 16:26:14 -0600 (MDT)
NIENKE, Bill P. - ACCOR-NA wrote:
> > Newbie to XSLT ~ I'm having trouble transforming this WSDL
> >
> > into HTML.

All of the elements in the source doc are in the
""; namespace.

Bind this namespace to a prefix *in your stylesheet* and then reference the
elements in XPath expressions using that prefix. When you don't put a prefix
before an element name in an XPath expression, it implies "in no namespace"
(there is no defaulting).

<xsl:stylesheet version="1.0"

> > 	       <TD ALIGN="left" BGCOLOR="ffffff">	
> > 		   <xsl:element name="ExtendedWeatherInfo"
> > xmlns:xsd="";
> > xmlns:xsi="";
> > xmlns=""; />

Do you really mean to put an <ExtendedWeatherInfo ...>
in the middle of your HTML?

> > 		     <b><xsl:text>Current Report for</xsl:text>
> > <xsl:value-of select="//Info/Location"/></b><br></br>

<xsl:value-of select="/w:ExtendedWeatherInfo/w:Info/w:Location"/>

(also note that you should avoid "//" where possible, for efficiency)

This should get you started.

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

 XSL-List info and archive:

Current Thread