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

RE: XLST newbie needs help

Subject: RE: XLST newbie needs help
From: "NIENKE, Bill P. - ACCOR-NA" <Nienke_Bill@xxxxxxxxxxxx>
Date: Tue, 22 Oct 2002 10:09:46 -0500
nienke needs
Thanks much Mike! That was just what I needed!

William Nienke
Web Developer 
Accor North America
972.702.3603
bnienke@xxxxxxxxxxxx


-----Original Message-----
From: Mike Brown [mailto:mike@xxxxxxxx]
Sent: Monday, October 21, 2002 5:26 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  XLST newbie needs help


NIENKE, Bill P. - ACCOR-NA wrote:
> > Newbie to XSLT ~ I'm having trouble transforming this WSDL
> >
http://www.ejseinc.com/WeatherService/Service.asmx?op=GetExtendedWeatherInfo
> > into HTML.

All of the elements in the source doc are in the
"http://esjeinc.com/WeatherService/" 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"
   xmlns:w="http://esjeinc.com/WeatherService/"
   xmlns:xsl="...


> > 	       <TD ALIGN="left" BGCOLOR="ffffff">	
> > 		   <xsl:element name="ExtendedWeatherInfo"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns="http://ejseinc.com/WeatherService/" />

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: 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

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


Current Thread

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.