Subject: getAttribute() in XSL actions From: Rob McDougall <RMcDouga@xxxxxxxxxxx> Date: Mon, 9 Mar 1998 18:08:07 -0500 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: JScript error handling in msxsl, Jonathan Marsh | Thread | Re: getAttribute() in XSL actions, Paul Grosso |
RE: JScript error handling in msxsl, Jonathan Marsh | Date | Re: getAttribute() in XSL actions, Paul Grosso |
Month |