Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


SV: [xsl] empty string parsed as float?

From: "Gabriel K" <gabriel.klappenbach@------------>
To:
Date: 6/2/2005 8:51:00 AM
Ah, I totally forgot, sorry!
Anyway, thanks for the answer.

/Gabriel

-----Ursprungligt meddelande-----
Fren: Michael Kay [mailto:mike@xxxxxxxxxxxx]
Skickat: den 2 juni 2005 03:54
Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Dmne: RE: [xsl] empty string parsed as float?

This is an XML Schema question not an XSLT question!

You can define the type of the element as a list data type that allows a
list of floats with minOccurs=0 and maxOccurs=1. Alternatively you could
define it as a union data type that's the union of a float and a zero-length
string.

You could also define the type as "nillable", but then you would have to
flag an empty element with xsi:nil="true"

> -----Original Message-----
> From: Gabriel K [mailto:gabriel.klappenbach@xxxxxxxxxxxx]
> Sent: 01 June 2005 21:09
> To: XSL-list
> Subject: [xsl] empty string parsed as float?
>
> I have a schema which defines an element with type float (or
> anything other
> than string for that matter).
> The xml file validated has the element, but it's empty.
> So the parser tells me it can't parse the value '' as a float.
>
> When I wrote the schema I thought that if you leave the
> element empty, it
> would pass validation, and if you don't leave it empty, it
> MUST be a float
> to pass validation.
> I don't want the element to have the type string or token, I
> want float. But
> I want it to not give an error if the element is empty.
> Is this possible? In that case how?
>
>
> /Gabriel


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent