Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


SV: SV: empty elements and xsd:string

From: Bryan Rasmussen <brs@----.-->
To: 'George Cristian Bina' <george@---------.--->
Date: 2/21/2005 6:01:00 PM
Hi George

Well see this is the thing that bugs me, from version 3 of the xml spec:

'Definition: An element with no content is said to be empty.] The
representation of an empty element is either a start-tag immediately
followed by an end-tag, or an empty-element tag. [Definition: An
empty-element tag takes a special form:]'

the first part of that definition I take to mean there is no whitespace
between the > and the </ so <tag></tag> and I don't see that as being a
lexical representation of a string. I would actually see it as being closest
to a null value. Question, does that lack of space between the > and </
count as a text(), if I do this <xsl:value-of select="count(//text())"/>
against this <tag><hi>  </hi><hi></hi><hi/></tag> I get a value of 1. Anyway
this is how I have always understood it, I am having a hard time considering
that my understanding on this matter may have been wrong. 

I see it as being problematic because if you have an element HouseNumber
which at one point you are treating as a string then  somebody without a
HouseNumber can build their application to generate an empty element, but
then later on if you want to change HouseNumber to actually always require a
number, why this waiting period exists can be explained by all sorts of
boring political things but now if you further constrain HouseNumber you
break people's applications. And all because xsd:string has a privileged
status vis-a-vis the other basic xsd datatypes. 

I'm not sure as to the implications regarding inheritance, but it seems
there should be some. At least for example where redefines are concerned. 



Best Regards,
Bryan Rasmussen


-----Oprindelig meddelelse-----
Fra: George Cristian Bina [mailto:george@o...]
Sendt: 21. februar 2005 16:44
Til: Bryan Rasmussen
Cc: xmlschema-dev@w...
Emne: Re: SV: empty elements and xsd:string


Hi Bryan,

 > But I'm wondering now, does this mean that there are also empty
 > nonNegativeIntegers and the like?

No, because empty is not a lexical representation of 0 (zero) for 
instance. The value space for nonNegariveInteger is the infinite set {0, 
1, 2, ...} and empty does not lexically represent any of these values.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com

From Farid.Mahini@L... Mon Feb 21 16:17:49 2005
Received: from lisa.w3.org ([128.30.52.41])
	by fri


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