This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dynamic name/value pairs on URL using "following::"


Brennan,

>My problem is with the "following::" syntax using the {} notation to get the 
>value from the XML file for the column on the right side.  I've tried it
many 
>different ways and it does not work.  I still get the value from the left
> column when I try: 
>following::{.XXX/YYY/ZZZ}

The {} notation is known as an attribute value template.  The point of it
is that anything within the {}s will be interpreted as an XPath pointing to
a node, and its value will be inserted in its place.  So, if the path:

  /XXX/YYY/ZZZ

points to the ZZZ element whose string value is "foo" then:

  href="ui.do?firstVar={/XXX/YYY/ZZZ}"

will result in the @href attribute taking the value:

  "ui.do?firstVar=foo"

It's not exactly clear from your question what your source looks like, and
what the relevant paths should be.  You do seem to be having problems with
knowing where the following:: axis should go: it's *part of* the XPath, and
so it needs to go inside the attribute value template as well.  So instead of:

  following::{XXX/YYY/ZZZ}

you want:

  {following::XXX/YYY/ZZZ}

I hope that this helps - showing some sample XML and saying what you want
to get from it is a good next step if it doesn't.

Cheers,

Jeni

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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]