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

Re: parent()

Subject: Re: parent()
From: Norman Walsh <ndw@xxxxxxxxxx>
Date: 10 Jul 2000 16:51:13 -0400
norman parent
/ "Spychalski, Frank" <frank.spychalski@xxxxxxx> was heard to say:
[...] 
| produces the following output:
| 
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
| "http://www.w3.org/TR/REC-html40/strict.dtd">
| <document foo="123"
| xmlns:xsp="http://www.apache.org/1999/XSP/Core"></document>
| 
| <!-- This page was served in 20 milliseconds by Cocoon 1.7.4 -->
| 
| Why isn't it:
| 
| <document foo="123"
| xmlns:xsp="http://www.apache.org/1999/XSP/Core">123</document>
|                                                                     ^^^
| any hints? 

Because...

|   <xsl:template match="document">
|     <document>
|       <xsl:attribute name="foo">123</xsl:attribute>

This sets the foo attribute of the document element *in the result tree*
to 123.

|       <xsl:value-of select="@foo"/>

And this returns the value of the foo attribute on the document element
*in the source tree*.

|     </document>
|   </xsl:template>
| </xsl:stylesheet>

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@xxxxxxxxxxxx | What is more wonderful than the delight
XML Technology Center     | which the mind feels when it *knows*? This
Sun Microsystems, Inc.    | delight is not for anything beyond the
                          | knowing, but is in the act of knowing. It
                          | is the satisfaction of a primary
                          | instinct.--Mark Rutherford


 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.