xsl-list
[Top] [All Lists]

RE: About source-attributes in result-attributes

2004-01-09 09:07:10
From: Robert A. van Ginkel [mailto:robert(_at_)stylegate(_dot_)com]
Sent: Friday, January 09, 2004 1:32 AM
Subject: Re: [xsl] About source-attributes in result-attributes


Thanx,

Sorry, for the HTML shell I thought it was filtered at mulberry's...

I think the list only filters attachments due to virus concerns.

What I think is strange in:
<input class="button" 
onclick="lgotoent('report(_dot_)php?view={(_at_)idx}')"/>
is that @idx doesn't have a x-path/namespace ref.
So you create a new element and within the attribute of that 
new element u
use data from the source xml by using a direct assignment of 
a variable.

It doesn't have to be a variable--it can be any valid XPath expression.  An
AVT is simply a parameter whose value is computed at run-time.  They can be
used within attributes of any literal result elements, and within attributes
of a limited number of XSLT elements.  See the XSLT 1.0 spec at
http://www.w3.org/TR/xslt#attribute-value-templates for more information.

but if i really really wanted to print
<input class="button" 
onclick="lgotoent('report(_dot_)php?view={(_at_)idx}')"/>
litterary to the target document what would be the syntax of that.

Enclose the AVT within another set of curly braces:

<input class="button" 
onclick="lgotoent('report(_dot_)php?view={{(_at_)idx}}')"/>

cheers,
b.

| brian martinez                           
brian(_dot_)martinez(_at_)cendant(_dot_)com |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

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



<Prev in Thread] Current Thread [Next in Thread>
  • RE: About source-attributes in result-attributes, Martinez, Brian <=