문제

I am using Orbeon Forms, and here is some sample code from xbl-simple.xhtml

XHTML with XBL Component

<foo:test id="my-test-1" myref="value1" foobar="en fr"/>

I am trying to understand the difference between (xbl:text=foobar vs value=foobar)

<xxforms:variable name="foobar" xbl:attr="xbl:text=foobar"/>

vs

<xxforms:variable name="foobar" xbl:attr="value=foobar"/>

If they are same then where exactly is xbl:text useful?

도움이 되었습니까?

해결책

The two are a bit different:

<xxforms:variable name="foobar" xbl:attr="xbl:text=foobar"/>

translates to:

<xxforms:variable name="foobar">en fr</xxforms:variable>

And:

<xxforms:variable name="foobar" xbl:attr="value=foobar"/>

translates to:

<xxforms:variable name="foobar" value="en fr"/>

In the first case, the value of the variable is the constant string "en fr".

In the second case, it is probably an invalid XPath expression!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top