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

Re: Implementing simple XLinks using XSL

Subject: Re: Implementing simple XLinks using XSL
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sat, 23 Dec 2000 19:01:58 +0000
simple xlink
Adam,

> This line:
> <xsl:template match="*[@xlink:show='embed'][@xlink:actuate='onLoad']">
> seems to not be picking up the correct elements. I tested it by writing out
> <foo>bar</foo> or something just to make sure that had the correct match
> pattern. Unfortunately nothing worked. Can someone verify that I have the
> correct match, or select a better one. I'm trying to avoid using a
> <for-each> loop if I can. 

The XPath:

 *[@xlink:show='embed'][@xlink:actuate='onLoad']

matches all that have a 'xlink:show' attribute with a value of 'embed'
and a 'xlink:actuate' attribute with a value of 'onLoad'.  I'm afraid
I've lost your original message, but I think that the element name
that you were interested in was xlink:simple - if that's the only
element name, you could use:

  xlink:simple[@xlink:show='embed'][@xlink:actuate='onLoad']

instead.  You could also combine the two predicates if you wanted:

  xlink:simple[@xlink:show='embed' and @xlink:actuate='onLoad']

That *should* match against an element that looks like:

  <xlink:simple xlink:show="embed" xlink:actuate="onLoad" />

If it doesn't, then you might be having a namespace problem: have you
defined the 'xlink' namespace in the same way in your source and your
stylesheet?

To debug, I'd get rid of the predicates and make sure that the element
you're after is matched then. If it's not matching, are you applying
templates to the element you're after? If it is matching, there might
be problems testing the values of the attributes if the values have
leading/trailing whitespace, different capitalisation and so on, so
check that that's the same.  If none of those help, try posting the
source here and see if someone else's eyes can spot the problem.

I hope that helps,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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.