OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Where are XML types ?

[ Lists Home | Date Index | Thread Index ]

Jonathan Robie wrote:

 > Philippe Poulard wrote:
 >
 >> Where are XML types ?
 >> People know xs:string, xs:int and xs:QName, because they are taken 
from raw data,
 >
 >
 >
 > These are defined in XML Schema. I don't know what "taken from raw 
data" means.


the specification talk about complex types and simple types
i was talking about simple types ; a raw data is "12345" or "2005-06-01"

 >
 >> but is there high level types for XML items such as xml:element, 
xml:attribute, or xml:namespace ?
 >
 >
 >
 > XML Schema does not define such a type because all elements would 
belong to it, and adding an attribute to an element to say that it is an 
element would be superfluous.


I agree that XML Schema is not the place to define an xml:element type
but I complain about XPath2, that need such a type but uses something 
else than a qualified name

The XML Infoset identifies the various

 > kinds of nodes, and most APIs or XML languages can recognize 
instances of these things.


the infoset could define this types

 >
 >> I have to name (with a QName) objects (that can be XML items) as if 
they were types.
 >
 >
 >
 > You can certainly assign QNames in some contexts. You can't add a 
type label directly to an attribute, because there's no place to put it. 
But what would be the point of adding information to an element to say 
that it is an element? Or are you trying to do something else?


i try to qualify types with QNames :
xs:string for a string
xs:int for an int
xml:element would be fine for an element
my:order for an order, not necessarily unmarshalled from an XML 
document, but it could

 >
 >> I really really don't think that XPath2 offers a reasonable solution 
with :
 >> "5 instance of xs:integer"
 >> ". instance of element()"
 >> the last one frightened me :(
 >
 >
 >
 > The type names in those two expressions are:
 >
 >  xs:integer
 >  element()


i was enlightening the fact that element() sounds like a function, not a 
type name !
i really prefer xml:element

 >
 > You also have syntax for testing whether something has a given type.
 >
 > Hope this helps!
 >
 > Jonathan
 >


-- 
Cordialement,

            ///
           (. .)
  -----ooO--(_)--Ooo-----
|   Philippe Poulard    |
  -----------------------




 

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

Copyright 2001 XML.org. This site is hosted by OASIS