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

Re: Conditional actions in XSL?

  • From: Henry Thompson <ht@c...>
  • To: xml-dev@i...
  • Date: 28 Jan 1998 15:11:12 +0000

xsl conditional if
Richard Light <richard@l...> writes:

> The conditions for XSL are set by the structure that you specify, e.g.:
> 
>     <element type="object">
>         <target-element>
>               <attribute name="REND" has-value="yes"/>
>         </target-element>
>     </element>
> 
> . . .
>
> I'm not sure about the ability to invoke a bit of script when testing
> the attribute value.  The XSL spec allows you to invoke ECMAscript when
> _setting_ attribute values on (output) flow objects - there is no reason
> at all why it couldn't allow the same feature when _testing_ attribute
> values on source elements.  (Obviously in this case the script would
> have to return true/false rather than a string.)

You're right, in XSL as currently proposed you can't do that, but it
is consistent with the existing (but unimplemented) part of the DSSSL
model of construction rules via the 'query' construction rule, so not
out of the question in principle.

> When trying out a bit of code to show how easy this all is, I couldn't
> get MSXSL to take any notice of an <attribute> statement inside a
> <target-element> as per the above example.  But I think it should have
> done!
> 
> One point is that the spec uses both 'name="XXX"' and 'type="XXX"' to
> qualify <attribute> in its examples in 3.2.3.  I think, though, that the
> 'type="XXX"' is an error.  (Neither worked with MSXSL.)

'name=...' is correct for the 'attribute' element type.  I haven't tried
MSXSL much, but their examples show patterns which use it, so I'm
surprised, because I can't make it work either.

ht
-- 
Henry S. Thompson, Human Communication Research Centre, University of Edinburgh
      2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
               Fax: (44) 131 650-4587, e-mail: ht@c...  
                      URL: http://www.cogsci.ed.ac.uk/~ht/

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2007 All Rights Reserved.