XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Brain Teaser: Element Author is of type xsd:string, what's an illegal value of Author?

Hi Roger,

Ah, I see now that it's not valid with respect to the schema.
ie. the problem with <tag/> is not that it's an illegal string, but that it's not a string at all.

   <xsd:element name="Author" type="xsd:string" />

   <Author> <tag/> </Author>

> However, that's not the same thing as giving Author a non-string value.
Being pedantic, I guess <tag/> is a "non-string" value.

PS: I think you meant "not valid", instead of "non-well-formed" - I always get those two confused, and had to look it up.


Brendan

On 10/02/07, Costello, Roger L. <costello@mitre.org> wrote:
Hi Brendan,
 
I think that's an example of <Author> having non-well-formed content, not an example of <Author> having an illegal string value.  Certainly if the "<" is escaped then <Author> is legal:
 
    <Author> &lt;tag/> </Author>
 
I'm not sure what the answer is.
 
/Roger


From: Brendan [mailto:melbourne.research@gmail.com]
Sent: Friday, February 09, 2007 1:29 PM
To: Costello, Roger L.
Subject: Re: [xml-dev] Brain Teaser: Element Author is of type xsd:string, what's an illegal value of Author?

What about
   <Author> <tag/> </Author>
Isn't an element a non-string value, and therefore illegal?


Brendan Macmillan


<xsd:element name="Author" type="xsd:string" />

<?xml version="1.0"?>
<Book>
        <Author>...</Author>
</Book>

Question: what is an invalid (non-string) value for <Author>?




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS