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

getAttribute() in XSL actions

Subject: getAttribute() in XSL actions
From: Rob McDougall <RMcDouga@xxxxxxxxxxx>
Date: Mon, 9 Mar 1998 18:08:07 -0500
xsl getattribute
Whew,

I created my first XSL stylesheet on the weekend using msxsl (thank you
Microsoft!).  I was struck by how many <eval>getAttribute(...)</eval>
calls there were.  Now, my impression was that escaping to ECMAScript
was supposed to be somewhat "exceptional" (i.e. the exception rather
than the rule).

Does anyone else think that maybe there should be a declarative XSL
action element to do this?  What about <select-attribute
name="attributeName"/>? This element would insert the text value from
within the target element's attribute (attributeName).  If one has
multiple target elements, then it could also use <select-attribute>
instead of <select-element> to retrieve the attribute value from the
target-element. Where you would use <select-element from="children |
descendants"><target-element ... /></select-element>, you could use
<select-attribute name="attributeName" from="children |
descendants"><target-element ... /></select-attribute> to retrieve the
attribute's value.

The only thing that leaves me confused is what <select-attribute
name="attributeName" from="children | descendants"/> would do since
we've got no way of disallowing this in the DTD.  Oh well, perhaps
someone brighter than me could come up with a reasonable action. :)

Just a suggestion based on a small amount of XSL experience,

Rob
=======================================================
Rob McDougall            Phone:  (613)751-4800 ext.5232
JetForm Corporation      Fax:    (613)751-4864
http://www.jetform.com   mailto:rmcdouga@xxxxxxxxxxxxxxxxxx
=======================================================


 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.