Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

XML Schema Patterns for Databinding

3,574 views

Published on

http://2006.xmlconference.org/programme/presentations/43.html

Published in: Technology
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

XML Schema Patterns for Databinding

  1. 1. W3C XML Schema Patterns for Databinding Paul Downey, BT Chair, XML Schema Patterns for Databinding Working Group XML 2006, December 5th 2006
  2. 2. XML Schema ?
  3. 3. Validation XML Schema Post XML Schema Schema Instance Validation Processor Infoset
  4. 4. Description XML Schema XML Sender Instance Receiver
  5. 5. Types xs:string xs:int XML tns:Address foo:PurchaseOrder
  6. 6. Databinding ?
  7. 7. Databinding Abstraction Model XML
  8. 8. Model • Java • Database • Annotated DOM • JSON • PHP serialisation • XML • Whatever
  9. 9. Why Describe ?
  10. 10. Duck Typing XML ?
  11. 11. Force Array <opt> { <name>value</name> name => ‘value’ </opt> } { <opt> name => [ <name>value1</name> ‘value1’, <name>value2</name> ‘value2’ </opt> ] }
  12. 12. Static Typing { int accountNo; long ammount; string name; }
  13. 13. What’s wrong with Databinding ?
  14. 14. “State of the Art” • reject valid XML Schema documents • reject valid XML instance documents • content of valid XML instance documents often unavailable in model
  15. 15. Impedance Mismatch >< OO
  16. 16. Circles, Triangles, Rectangles XML 2003 http://www.idealliance.org/papers/dx_xml03/papers/06-02-01/06-02-01.html
  17. 17. I ! Mixed Content text <O/> text <O> text </O>
  18. 18. Don’t Databind? • XSLT • DOM • LINQ • E4X • XJ • etc
  19. 19. Abstraction Scale Objects Infoset XML Bits Typed DOM Text DOM Templating
  20. 20. They Don’t Like XML!
  21. 21. Abstraction ?
  22. 22. XML Schema is Big .. • Lot’s of ways to describe the concrete • Lot’s of ways to represent the abstract
  23. 23. Partial Implementations “Our tool doesn’t support xs:foo. Change your schema.” * vendor
  24. 24. So begins .. “The Barf Dance”
  25. 25. it’s not so much that schema sucks ...
  26. 26. or that databinding tools suck ...
  27. 27. it’s that all databinding tools suck differently
  28. 28. W3C Working Group ?
  29. 29. WS-I • Basic Profile • XML Schema Work Plan Working Group
  30. 30. W3C Workshop XML Schema 1.0 User Experiences
  31. 31. Discussion
  32. 32. Don’t Just Change Schema! … 300,000+ developers use XSD … There is tremendous value in XML Schema. Don't just change it… Soumitra Sengupta, Microsoft
  33. 33. Discussion Topics • versioning • profiles and patterns of use • code generation (v) validation • Unique Particle Attribution (UPA) • XML Schema 1.1 • test suite
  34. 34. W3C XML Schema Patterns for Databinding Working Group !
  35. 35. Deliverables • W3C Recommendation for Basic Patterns • W3C Recommendation for Advanced Patterns • Test Suite • Mechanism to Detect patterns
  36. 36. Out of Scope: • Profile of Schema • Language Specific Detail
  37. 37. Patterns !
  38. 38. AnyURIElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')] <xs:element name=quot;anyURIElementquot; type=quot;xs:anyURIquot; /> http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyURIElement
  39. 39. ElementMinOccurs0 MaxOccursUnbounded .//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs) http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementMinOccurs0MaxOccursUnbounded
  40. 40. SequenceSingle RepeatedElement .//xs:sequence[count(xs:element) = 1]/ xs:element[@maxOccurs = 'unbounded']/ (., @maxOccurs) Overlapping! http://www.w3.org/2002/ws/databinding/patterns/6/09/SequenceSingleRepeatedElement
  41. 41. StringEnumerationType .//xs:simpleType/xs:restriction[ @base/resolve-QName(.,..) = xs:QName('xs:string') and xs:enumeration]/ (., @base, xs:enumeration/(., @value)) <xs:simpleType name=quot;Beatlequot;> <xs:restriction base=quot;xs:stringquot;> <xs:enumeration value=quot;Johnquot; /> <xs:enumeration value=quot;Paulquot; /> <xs:enumeration value=quot;Georgequot; /> <xs:enumeration value=quot;Ringoquot; /> </xs:restriction> http://www.w3.org/2002/ws/databinding/patterns/6/09/StringEnumerationType
  42. 42. SOAP Encoded Array ./xs:complexType[@name]/xs:complexContent/ xs:restriction[ @base/resolve-QName(.,..) = xs:QName ('soap11enc:Array')]/ xs:attribute[(@ref/resolve-QName(.,..) = xs:QName('soap11enc:arrayType')) and @wsdl11:arrayType]/ (../.., ../(., @base), ., @ref, @wsdl11:arrayType) http://www.w3.org/2002/ws/databinding/patterns/6/09/SOAPEncodedArray
  43. 43. Palatability ?
  44. 44. Value Judgement • xs:any becomes XMLElement • xs:anyURI becomes String • xs:decimal becomes String
  45. 45. Examples !
  46. 46. ElementMinOccurs0 MaxOccursUnbounded <xs:element name=quot;durationListquot; type=quot;ex:DurationListquot; /> <xs:complexType name=quot;DurationListquot;> <xs:sequence> <xs:element name=quot;durationValuequot; type=quot;xs:shortquot; ! ! ! ! ! minOccurs=quot;0quot; maxOccurs=quot;unboundedquot; /> </xs:sequence> </xs:complexType> http://www.w3.org/2002/ws/databinding/examples/6/09/ElementMinOccurs0MaxOccursUnbounded
  47. 47. Example Descriptions • ComplexTypeSequenceExtension.xsd • echoComplexTypeSequenceExtension.xsd • echoComplexTypeSequenceExtension.wsdl • echoComplexTypeSequenceExtension-wsdl20.wsdl
  48. 48. Example Instances • ElementMinOccurs0MaxOccursUnbounded-01.xml • echoElementMinOccurs0MaxOccursUnbounded-01.xml • echoElementMinOccurs0MaxOccursUnbounded-01-soap11.xml • echoElementMinOccurs0MaxOccursUnbounded-01-soap12.xml
  49. 49. Test Suite Example Description Instance Model Toolkit Output
  50. 50. Test Reports
  51. 51. Patterns Detector !
  52. 52. Patterns Detector XML Patterns Schema Detector (URIs)
  53. 53. Buckets !
  54. 54. Basic Patterns • known to work with “state of the art” implementations • they’re, um, very Basic Publishers of Schemas Take Note!
  55. 55. TargetNamespace .[@targetNamespace]/ (., @targetNamespace) An [XML Schema 1.0] document conforming to this specification MUST define a targetNamespace whose value is an absolute URI. † http://www.w3.org/2002/ws/databinding/patterns/6/09/TargetNamespace
  56. 56. “State of the Art” ?
  57. 57. SLIPPERY SLOPE
  58. 58. Value Judgement • new tools arrive • old tools become defunct • some tools are very lame • we can’t test every tool “Bring out your implementations”
  59. 59. Advanced Patterns • exhibited by real schemata • they’re, um, not very interoperable Developers of Implementations Take Note!
  60. 60. Not Advanced ?
  61. 61. SLIPPERY SLOPE
  62. 62. Value Judgement • XML Schema is big • Coverage or Possible to Databind? • always another Schema “Bring out your schemata”
  63. 63. Patterns in the Wild
  64. 64. Build Your Own Bucket • List Patterns your schemas use • List Patterns your toolkit supports • Analyse schemas “in the wild”
  65. 65. Other Topics ?
  66. 66. Document Conformance Implementation Conformance
  67. 67. WS-I Basic Profile • Detector works on WSDL 1.1 • Composable with Basic Profile 1.1
  68. 68. Annotations • Tools Generate them • Useful for “round tripping” • No-one is submitting them
  69. 69. Versioning • Concrete patterns exist • They’re all Advanced XML Schema 1.1 is the answer?
  70. 70. Progress ?
  71. 71. Schedule
  72. 72. Participants • BT • Health Level 7 • National Association of Convenience Stores (NACS) • Origo Services Limited • SAP AG • WSO2 • Invited Expert: Priscilla Walmsley ... and that’s It!
  73. 73. We Need Your Help! www.w3.org/2002/ws/databinding
  74. 74. How You Can Help • Participate in the Working Group • Encourage your vendor of choice to participate • Contribute to the test suite • Contribute your Schemata www.w3.org/2002/ws/databinding
  75. 75. Thank you! Any Questions ? www.w3.org/2002/ws/databinding

×