[Home] [By Thread] [By Date] [Recent Entries]

  • From: Brendan <melbourne.research@g...>
  • To: "Costello, Roger L." <costello@m...>, xml-dev@l...
  • Date: Sat, 10 Feb 2007 06:22:50 +1100

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@m...> 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@g...]
Sent: Friday, February 09, 2007 1:29 PM
To: Costello, Roger L.
Subject: Re: 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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member