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

Re: Catching head

Subject: Re: Catching head
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 16 Nov 2000 10:06:29 +0000
Re: Catching head
Brian,

> How would I do a hidden field that the value equals the value of orgId when
> I have

Presumably by a hidden field you mean that you're creating an HTML
input element with type="hidden" and a value equal to the value of
the 'head' element's 'orgId' attribute?

How to get the value of the 'head' element's 'orgId' attribute depends
on where you start from.  If you start from the 'head' element, then
it's just:

  @orgId

If you start from the acctXML element, then it's:

  head/@orgId

If you start from the request within the acctXML Element, then it's:

  ../head/@orgId

If the acctXML element is the document element (the element that holds
the entire document) then wherever you start from then you can always
use:

  /acctXML/head/@orgId

and so on.

I'll assume that you're starting from the acctXML element.  To create
a hidden input field in your HTML, you need:

  <input type="hidden" name="orgId" value="..." />

The value is where you want to put the XPath that I've discussed
above.  To make the XSLT processor include the evaluated value,
include it as an attribute value template, within {}s:

  <input type="hidden" name="orgId" value="{head/@orgId}" />

You can do this in other ways, most notably:

  <input type="hidden" name="orgId">
    <xsl:attribute name="value">
      <xsl:value-of select="head/@orgId" />
    </xsl:attribute>
  </input>

This is useful if you want to do any kind of conditional processing on
the value of the attribute.

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.