When does one need one brace and when does one need two braces for
interpolated expressions? Is there a single rule that covers everything from html/xslt to xforms/xpl? Wasn't able suss it out looking at the usage, and googling for '{{' isn't much help. :) Here's an example from the sample apps showing both: <xforms:submission xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="2.0" method="put" action="/exist/rest/db/orbeon/forms/{tokenize(/*, '/')[1]}/{{digest(string(random(true)), 'MD5', 'hex')}}"/> -- -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Mike,
use one when using XSL, or when the page isn't run through XSL and your { is for xforms. use two when the page is run through XSL and your { is directed at xforms By run through XSL I mean it has xsl:version at the top (like your example) Hope this helps Ryan Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Mike Leary [mailto:[hidden email]] >Sent: 26 January 2007 22:55 >To: [hidden email] >Subject: [ops-users] one brace or two and when? '{{' v. '{' > >When does one need one brace and when does one need two braces >for interpolated expressions? Is there a single rule that >covers everything from html/xslt to xforms/xpl? > >Wasn't able suss it out looking at the usage, and googling for '{{' >isn't much help. :) > >Here's an example from the sample apps showing both: > ><xforms:submission > xmlns:xforms="http://www.w3.org/2002/xforms" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xsl:version="2.0" > method="put" > action="/exist/rest/db/orbeon/forms/{tokenize(/*, >'/')[1]}/{{digest(string(random(true)), 'MD5', 'hex')}}"/> > >-- > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I think I've got it ... 1. use { when using XSL 2. use { when the page is NOT XSLT'd and the { is for xforms 3. use {{ when the page IS XSLT'd and the { is for xforms Use one unless you're in an xforms attribute *and* the page will be processed by xsl. That is, the extra containing { in case 3 survives the XSLT to become a regular case 2. In the example, tokenize is for XSL, while true, random, string, digest are post-xslt xpath in xforms. On Fri, Jan 26, 2007 at 11:00:49PM +0000, Ryan Puddephatt wrote: > Mike, > use one when using XSL, or when the page isn't run through XSL and > your { is for xforms. > use two when the page is run through XSL and your { is directed at > xforms > > By run through XSL I mean it has xsl:version at the top (like your example) -- -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Mike Leary wrote:
> I think I've got it ... > > 1. use { when using XSL > 2. use { when the page is NOT XSLT'd and the { is for xforms > 3. use {{ when the page IS XSLT'd and the { is for xforms > > Use one unless you're in an xforms attribute *and* the page will be > processed by xsl. That is, the extra containing { in case 3 survives > the XSLT to become a regular case 2. Exactly: {{ and }} is simply an XLST escape syntax for { and }. When encountering {{ and }}, XSLT doesn't consider the content as an XPath expression to evaluate as it would normally, but instead outputs { and }. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |