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]
[Unsafe/unwise XSD structures] Mapping XML into data structures ina programming language? Then don't use these XML Schema constructs

Hi Folks,

Is this a reasonable recommendation with regards to creating XML Schemas that will be used by data binding tools?

1. If you want your users to be able to be able to use any data binding tool then you should avoid using any of the elements, attributes, and data types listed below. 
 
2. It's likely that your users will use only certain data binding tools. Then you need to seek out their limitations and avoid using the XML Schema constructs they don't support. For example, if your users only use the Codalogic data binding tool (XML to C++) then:

Don't use these XML Schema elements:

<appinfo> 
<key>
<keyref>
<notation>
<unique>

Don't use this XML Schema attribute:

@xpath

Don't use these XML Schema datatypes:

ENTITIES
ENTITY
NOTATION

3. If you stick with an all-XML solution then you needn't worry about this issue as the XML languages handle all the XML Schema constructs.
 
/Roger 

-----Original Message-----
From: Costello, Roger L. 
Sent: Thursday, December 04, 2008 9:08 AM
To: 'xml-dev@lists.xml.org'
Subject: RE: [xml-dev] Feasibility of "do all application coding in the XML languages"?



Rick Jelliffe wrote:

> "what kinds of XSD structures are unwise or unsafe?"

> http://www.w3.org/TR/xmlschema-patterns/
> 
> The gist is in Appendix F

Thanks Rick! 

Let me see if I understand correctly:

Want to create an XML Schema that is broadly adopted?

Some of your users will use data binding tools to map the XML Schema constructs into data structures in an imperative programming language?

Then don't use any of the XML Schema constructs listed below.

Don't use these XML Schema elements:

<all>
<anyAttribute>
<appinfo>
<attributeGroup>
<choice>
<fractionDigits>
<group>
<key>
<keyref>
<length>
<list>
<maxExclusive>
<maxInclusive>
<maxLength>
<notation>
<pattern>
<redefine>
<simpleContent>
<totalDigits>
<union>
<unique>
<whitespace> 

Don't use these XML Schema attribute:

@block
@blockDefault
@default
@final
@finalDefault
@fixed
@itemType
@memberTypes
@processContents
@substitutionGroup
@xpath

Don't use these XML Schema datatypes:

ENTITIES
ENTITY
ID
IDREF
IDREFS
NMTOKEN
NMTOKENS
NOTATION
date
decimal
duration
float
gDay
gMonth
gMonthDay
gYear
gYearMonth
hexBinary
integer
language
negativeInteger
unsignedByte
unsignedInt
unsignedLong
unsignedShort

Do I correctly understand the state of affairs with regard to using data binding tools with XML Schema?

/Roger


[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