Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: Brendan <melbourne.research@-----.--->
To: "Costello, Roger L." <costello@-----.--->, xml-dev@-----.---.---
Date: 2/9/2007 7:23:00 PM
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: [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>?


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