It's not really a problem, but knowing this would really help.
The problem I have is that I have an element with a bind, the nodeset refered by the bind contains xml namespaces. <xforms:repeat bind="__query_Rm9ybVF1ZXJ5ICgxNjgyKQ____"> <xforms:bind nodeset="sdns1:document/sdns1:any-document" id="__query_Rm9ybVF1ZXJ5ICgxNjgyKQ____"/> <xforms:instance id="Default"> <sdns1:form> ... </sdns1:form> </xforms:instance> This gives me an error when deploying the form, as the namespace can not be resolved. Adding the namespace declaration on the repeat solves this issue, but so does adding it to the instance. I'm curious as to what context Orbeon uses to resolve the namespace? Kind regards, Chris Vesters |
Administrator
|
Hi Chris, You should just need to have that "sdns1" prefix defined everywhere you are using it, which in your case means where your <xforms:bind> and <sdns1:form> are. The namespace can be declared on those elements, or on any of their parents. Usually, the simplest thing is to declare them on the root element (the <xh:html>), along with other namespaces. Does this make sense? Alex On Wed, Jan 27, 2016 at 8:19 AM cvesters <[hidden email]> wrote: It's not really a problem, but knowing this would really help. You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
This post was updated on .
I know how namespaces work, I am just trying to find out how Orbeon determines the namespace mapping for a namespace in a bind.
Since a bind is not inside an xform instance. So which declarations will it consider when trying to resolve the namespace? Edit: I just found out that the bind is actually being placed directly on the xforms:repeat as a ref attribute. So, I have an <xforms:repeat ref="..." /> This ref is an expression with namespaces. Which context will be used to resolve the namespaces? The context of the xforms repeat obviously, but I discovered that putting the namespace declaration on the xforms:instance als seems to work. Is this expected or just luck? |
Administrator
|
Hi Chris, I am not sure to get your question; there is nothing specific to Orbeon Forms or even XForms here: when an XPath expression is used, if it contains prefixes, the meaning of those prefixes is based on the namespaces in scope at the point where the expression is found. In your case, that would be the namespaces in scope where you put the <xf:bind>. Does this help? Alex On Wed, Jan 27, 2016 at 11:10 PM cvesters <[hidden email]> wrote: I know how namespaces work, I am just trying to find out how Orbeon You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I though I witnessed some weird behaviour, but I'm unable to reproduce it. Perhaps I did something wrong the first time.
What I saw was that if I put the namespace declaration on the <xforms:instance> the namespace could be found. Which is weird because the element containing the ref is not inside the instance. Perhaps there was a lingering namespace declarations somewhere. But for a moment it seemed like Orbeon did something weird with resolving namespaces, like they would look for namespace declarations in the default instance as well. |
Administrator
|
Hi Chris, Understood. And Orbeon Forms shouldn't do anything unexpected with namespaces. To people unfamiliar with namespaces, how namespaces work can already be "unexpected" enough :). But of course, just let us know if in the future you stumble again into that case. Alex On Fri, Jan 29, 2016 at 6:53 AM cvesters <[hidden email]> wrote: I though I witnessed some weird behaviour, but I'm unable to reproduce it. You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |