Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Is a token element with a carriage return, or leading/trailing spaces, valid?

From: "Gerald Sheehan" <gerald.sheehan@------.--->
To: "Costello, Roger L." <costello@-----.--->, <xmlschema-dev@--.--->
Date: 2/15/2007 6:56:00 AM
Hi Roger,

As Michael stated, both these instances are indeed valid and the latest
release of XMLSpy 2007SP2 flags them both as valid. In this case you
must be using a previous release of XMLSpy that flagged the instances as
invalid. I replied to you off-line earlier and you're welcome to
follow-up there!


Best regards,

.... Jerry Sheehan
.... Pre-Sales Engineer
.... Altova, Inc.
 www.altova.com



-----Original Message-----
From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...]
On Behalf Of Michael Kay
Sent: Thursday, February 15, 2007 11:35 AM
To: 'Costello, Roger L.'; xmlschema-dev@w...
Subject: RE: Is a token element with a carriage return, or
leading/trailing spaces, valid?


These instances are valid.

People often misread this bit of the spec, because it's very badly
written.
What isn't immediately clear is that when it talks about the lexical
space of the data type, that isn't the value as it appears in your
source document, it's the value after applying any processing implied by
the whitespace facet. In this case, applying the whitespace facet
creates a value that satisfies the rules for the lexical space.

The fact that xs:token is such a ridiculous misnomer for this data type
doesn't help...

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: xmlschema-dev-request@w...
> [mailto:xmlschema-dev-request@w...] On Behalf Of Costello, Roger L.
> Sent: 15 February 2007 15:48
> To: xmlschema-dev@w...
> Subject: Is a token element with a carriage return, or 
> leading/trailing spaces, valid?
> 
> 
> Hi Folks,
>  
> Consider this element declaration:
>  
>       <element name="Title" type="token"/>
> 
> And consider these two instances of the element:
> 
>       <Title>My Life and 
>       Times</Title>
> 
>       <Title> My Life and Times </Title>
> 
> In the first instance, the data has a carriage return.
> 
> In the second instance, the data has leading and trailing spaces.
> 
> Are the instances valid or invalid?
> 
>     XMLSpy">XMLSpy says they are invalid.
> 
>     Oxygen XML says they are valid.
> 
> Which is correct?
> 
> /Roger
> 





From lists@n... Fri Feb 23 15:56:46 2007
Received: from wiggum.w3.org ([128.30.52.23])
	by frink.w3.org with esmtp (Exim 4.50


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