This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Mozilla XML > April 2005 > Some questions on XForms





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Some questions on XForms
Anne van Kesteren

2005-04-04, 12:35 pm

I wasn't sure where to publish some comments on my first experiences
with XForms. However, as some already asked questions about it here, I
thought I could join.

After playing around with an example that used xsd:decimal I tried
altering it to xsd:language and see if that worked:


<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<style type="text/css">
/* Yes, that is one ugly hack. */
@namespace xforms url("http://www.w3.org/2002/xforms");
xforms|*[invalid] input { background-color: red; }
</style>
<xf:model>
<xf:instance>
<test xmlns="">
<foo>en</foo>
</test>
</xf:instance>
<xf:bind nodeset="/test/foo" type="xsd:language"/>
</xf:model>
<xf:input ref="/test/foo"><xf:label>Test xsd:language
</xf:label></xf:input>
</html>


.... apparently, it did not. (Also, when you change xsd:language to
xsd:decimal in the above example it does not change to NaN or is that
the behavior it should have?) Is this because xsd:language and possibly
other types are not yet implemented?

I was also wondering if NaN is a valid xsd:decimal value or not. Since
from testing it I sometimes get it back with a red background and
sometimes not.


--
Anne van Kesteren
<http://annevankesteren.nl/>
Doron Rosenberg

2005-04-04, 12:35 pm

Anne van Kesteren wrote:
> I wasn't sure where to publish some comments on my first experiences
> with XForms. However, as some already asked questions about it here, I
> thought I could join.
>
> After playing around with an example that used xsd:decimal I tried
> altering it to xsd:language and see if that worked:


Mozilla doesn't support xsd:language at this time for Schema Validation.
It is not on the must have list XForms defines, so its low in priority.

>
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xf="http://www.w3.org/2002/xforms"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <style type="text/css">
> /* Yes, that is one ugly hack. */
> @namespace xforms url("http://www.w3.org/2002/xforms");
> xforms|*[invalid] input { background-color: red; }
> </style>
> <xf:model>
> <xf:instance>
> <test xmlns="">
> <foo>en</foo>
> </test>
> </xf:instance>
> <xf:bind nodeset="/test/foo" type="xsd:language"/>
> </xf:model>
> <xf:input ref="/test/foo"><xf:label>Test xsd:language
> </xf:label></xf:input>
> </html>
>
>
> ... apparently, it did not. (Also, when you change xsd:language to
> xsd:decimal in the above example it does not change to NaN or is that
> the behavior it should have?) Is this because xsd:language and possibly
> other types are not yet implemented?


http://w3.org/TR/xmlschema-2/#decimal makes no mention of NaN, so
probably not valid. I believe float and double do specify it, but I
know that Mozilla doesn't support NaN for those.
>
> I was also wondering if NaN is a valid xsd:decimal value or not. Since
> from testing it I sometimes get it back with a red background and
> sometimes not.
>
>

Anne van Kesteren

2005-04-04, 12:35 pm

Doron Rosenberg wrote:
>
> Mozilla doesn't support xsd:language at this time for Schema Validation.
> It is not on the must have list XForms defines, so its low in priority.


Ok.


> http://w3.org/TR/xmlschema-2/#decimal makes no mention of NaN, so
> probably not valid. I believe float and double do specify it, but I
> know that Mozilla doesn't support NaN for those.


So when you multiple to fields and have the result in a third field it
can not even be NaN? (We do that know.) It seems strange that all other
numeric types do define NaN and xsd:decimal does not... Perhaps an
oversight?


--
Anne van Kesteren
<http://annevankesteren.nl/>
Doron Rosenberg

2005-04-04, 12:35 pm

Anne van Kesteren wrote:
> Doron Rosenberg wrote:
>
>
>
> Ok.
>
>
>
>
> So when you multiple to fields and have the result in a third field it
> can not even be NaN? (We do that know.) It seems strange that all other
> numeric types do define NaN and xsd:decimal does not... Perhaps an
> oversight?
>
>

Well, float and double are hardley all other types ;)
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews