Re: XForms disappointed beginner
Alex Meyers <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Aaron Reed wrote:
>
> Hi Alex,
>
> Its takes a little bit to get the hang of writing XForms. Did you try
> running your form through an XForms validator? There is one at:
> http://xformsinstitute.com/validator/ When I put your form through the
> validator (the first step I always do when something isn't working the
> way that I think that it should) I got some errors. Firstly, you need
> to namespace qualify the instance. If you are using xpath expressions
> to get to the instance without namespaces, then you need to put xmlns=""
> on either the xf:instance node or on the root node of the instance
> document (the first child node of the xf:instance). This is covered in
> the XForms:Essentials book, but you may have missed it when you were
> reading it. "The instance data XML itself is not defined in any
> namespace, so the xmlns="" declaration is essential to turn off the
> default XHTML namespace that would otherwise be in effect at this
> point." When I did that to your form, I got the numbers to appear.
>
> Then I changed the value of 'required' to 43, saw the value change in
> the calculate when I tabbed out of the field and when I clicked on the
> save button it saved fine to my local disc. When I changed the required
> field to 'aa' I saw calc go to NaN and save was NOT successful because
> the required field did not contain a valid integer.
>
> I got what you need to make relevant do what you want it to do, too. Use
> this bind: <xf:bind id="Relevant" relevant="../Required > 5"
> nodeset="Relevant" />. Of course, to make it hide under Mozilla you'll
> have to style it. We don't support pseudo classes quite yet, so you'd
> have to use the temporary attribute that we set on it. So the style
> would look like this: xf|*[disabled] {display: none; }. For Novell's
> plugin or formsPlayer, that should look like: xf|*:disabled {display:
> none; }, I believe.
>
> I hope that this helps,
> --Aaron
Hi Aaron,
the namespace adaption works, thank you very much
the styling however I can not get to work
<style type="text/css">
xf|*[disabled] {display: none;}
</style>
Alex