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

RE: Why "value-of "cannot work?

Subject: RE: Why "value-of "cannot work?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sat, 24 Feb 2001 12:25:10 -0000
RE:  Why "value-of "cannot work?
>  I wrote an xml document and an xsl blow,and they were in the
> same  directory.I wanted
> to see the result ---Fred Smith on my screan.But i was disappointed.

Well, your stylesheet is riddled with errors.

>  <xsl:stylesheet xmlns:xsl="www.3org.com/TR/WD-xsl">

That namespace resembles the namespace for the old Microsoft dialect of XSL,
but even for that dialect, it's wrong. First decide whether you want to use
Microsoft WD-xsl or W3C XSLT (they are quite different,and WD-xsl is
effectively obsolete: see the MSXML FAQ at www.netcrucible.com ) and then
type the namespace correctly, otherwise your document isn't even a
stylesheet.

> <xsl:template match="/">
>
>  <xsl:template match="person">

Template rules are never nested in XSLT.

>    <xsl:value-of select="person/given-name" />

Delete "person/": you're looking for a <person> element within a <person>
element.
>
>    <xsl:value-of match="family-name" />

Change "match" to "select".

I suggest you start by taking some sample stylesheets written by someone
else and getting them to work in your environment. Then see if you can
modify them to create your own.

Mike Kay


 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.