What is the best way to handle attribs etc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

What is the best way to handle attribs etc

Adam Flinton-2
Dear All,


I am trying to use Xforms (currently within Orbeon) to create forms for
editing HL7 MIF models.

These models basically contain all their semantic etc info (i.e. the
main information ) in attributes e.g.:

<stateTransition root="DEFN" artifact="DIM" domain="RX" name="000000"
realmNamespace="UK" stateTransitionName="activate"
className="SomeClass"/>


All the instance examples simply give examples of instance/models as
being purely element skeletons.

What is the best way for ensuring that the attribs are present etc? I
can obviously write the Xpaths relevant for attribs but again I am
basically asking wrt best practice for handling attribs.

e.g. most of the attribs are lists of values contained within the
schemas e.g. the root= can only contain DEFN, BAL, PROF or PUB. How do
people get these into their XForms as drop downs?


Adam




--
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
Reply | Threaded
Open this post in threaded view
|

Re: What is the best way to handle attribs etc

Erik Bruchez
Administrator
Adam Flinton wrote:

> Dear All,
>
>
> I am trying to use Xforms (currently within Orbeon) to create forms for
> editing HL7 MIF models.
>
> These models basically contain all their semantic etc info (i.e. the
> main information ) in attributes e.g.:
>
> <stateTransition root="DEFN" artifact="DIM" domain="RX" name="000000"
> realmNamespace="UK" stateTransitionName="activate"
> className="SomeClass"/>
>
>
> All the instance examples simply give examples of instance/models as
> being purely element skeletons.
>
> What is the best way for ensuring that the attribs are present etc? I
> can obviously write the Xpaths relevant for attribs but again I am
> basically asking wrt best practice for handling attribs.
>
> e.g. most of the attribs are lists of values contained within the
> schemas e.g. the root= can only contain DEFN, BAL, PROF or PUB. How do
> people get these into their XForms as drop downs?
Binding an xforms:select1 to an attribute is no different than binding
it to an element. As for the items contained in the list, you can either
inline them with xforms:item, or refer to them dynamically with
xforms:itemset.

If you use xforms:itemset, you want to have a list of names and values
in an XML document. You could possibly use the XML Schema if the schema
contains those.

Now what you can not easily do with XForms is adding and removing
attributes, based on a selection control. If the control is bound to an
attribute, and you remove that attribute with xforms:delete, then the
control disappears (technically, it becomes non-relevant), which is not
what you really would like. But I am not sure if you have this problem
at this point.

-Erik




--
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