OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Conditional actions in XSL?

[ Lists Home | Date Index | Thread Index ]
  • From: Henry Thompson <ht@cogsci.ed.ac.uk>
  • To: xml-dev@ic.ac.uk
  • Date: 28 Jan 1998 15:11:12 +0000

Richard Light <richard@light.demon.co.uk> 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@cogsci.ed.ac.uk  
                      URL: http://www.cogsci.ed.ac.uk/~ht/

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS