XML Schema Patterns for Databinding

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    XML Schema Patterns for Databinding - Presentation Transcript

    1. W3C XML Schema Patterns for Databinding Paul Downey, BT Chair, XML Schema Patterns for Databinding Working Group XML 2006, December 5th 2006
    2. XML Schema ?
    3. Validation XML Schema Post XML Schema Schema Instance Validation Processor Infoset
    4. Description XML Schema XML Sender Instance Receiver
    5. Types xs:string xs:int XML tns:Address foo:PurchaseOrder
    6. Databinding ?
    7. Databinding Abstraction Model XML
    8. Model • Java • Database • Annotated DOM • JSON • PHP serialisation • XML • Whatever
    9. Why Describe ?
    10. Duck Typing XML ?
    11. Force Array <opt> { <name>value</name> name => ‘value’ </opt> } { <opt> name => [ <name>value1</name> ‘value1’, <name>value2</name> ‘value2’ </opt> ] }
    12. Static Typing { int accountNo; long ammount; string name; }
    13. What’s wrong with Databinding ?
    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. Impedance Mismatch >< OO
    16. Circles, Triangles, Rectangles XML 2003 http://www.idealliance.org/papers/dx_xml03/papers/06-02-01/06-02-01.html
    17. I ! Mixed Content text <O/> text <O> text </O>
    18. Don’t Databind? • XSLT • DOM • LINQ • E4X • XJ • etc
    19. Abstraction Scale Objects Infoset XML Bits Typed DOM Text DOM Templating
    20. They Don’t Like XML!
    21. Abstraction ?
    22. XML Schema is Big .. • Lot’s of ways to describe the concrete • Lot’s of ways to represent the abstract
    23. Partial Implementations “Our tool doesn’t support xs:foo. Change your schema.” * vendor
    24. So begins .. “The Barf Dance”
    25. it’s not so much that schema sucks ...
    26. or that databinding tools suck ...
    27. it’s that all databinding tools suck differently
    28. W3C Working Group ?
    29. WS-I • Basic Profile • XML Schema Work Plan Working Group
    30. W3C Workshop XML Schema 1.0 User Experiences
    31. Discussion
    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. Discussion Topics • versioning • profiles and patterns of use • code generation (v) validation • Unique Particle Attribution (UPA) • XML Schema 1.1 • test suite
    34. W3C XML Schema Patterns for Databinding Working Group !
    35. Deliverables • W3C Recommendation for Basic Patterns • W3C Recommendation for Advanced Patterns • Test Suite • Mechanism to Detect patterns
    36. Out of Scope: • Profile of Schema • Language Specific Detail
    37. Patterns !
    38. AnyURIElement .//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')] <xs:element name=\"anyURIElement\" type=\"xs:anyURI\" /> http://www.w3.org/2002/ws/databinding/patterns/6/09/AnyURIElement
    39. ElementMinOccurs0 MaxOccursUnbounded .//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/ (@minOccurs, @maxOccurs) http://www.w3.org/2002/ws/databinding/patterns/6/09/ElementMinOccurs0MaxOccursUnbounded
    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. StringEnumerationType .//xs:simpleType/xs:restriction[ @base/resolve-QName(.,..) = xs:QName('xs:string') and xs:enumeration]/ (., @base, xs:enumeration/(., @value)) <xs:simpleType name=\"Beatle\"> <xs:restriction base=\"xs:string\"> <xs:enumeration value=\"John\" /> <xs:enumeration value=\"Paul\" /> <xs:enumeration value=\"George\" /> <xs:enumeration value=\"Ringo\" /> </xs:restriction> http://www.w3.org/2002/ws/databinding/patterns/6/09/StringEnumerationType
    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. Palatability ?
    44. Value Judgement • xs:any becomes XMLElement • xs:anyURI becomes String • xs:decimal becomes String
    45. Examples !
    46. ElementMinOccurs0 MaxOccursUnbounded <xs:element name=\"durationList\" type=\"ex:DurationList\" /> <xs:complexType name=\"DurationList\"> <xs:sequence> <xs:element name=\"durationValue\" type=\"xs:short\" ! ! ! ! ! minOccurs=\"0\" maxOccurs=\"unbounded\" /> </xs:sequence> </xs:complexType> http://www.w3.org/2002/ws/databinding/examples/6/09/ElementMinOccurs0MaxOccursUnbounded
    47. Example Descriptions • ComplexTypeSequenceExtension.xsd • echoComplexTypeSequenceExtension.xsd • echoComplexTypeSequenceExtension.wsdl • echoComplexTypeSequenceExtension-wsdl20.wsdl
    48. Example Instances • ElementMinOccurs0MaxOccursUnbounded-01.xml • echoElementMinOccurs0MaxOccursUnbounded-01.xml • echoElementMinOccurs0MaxOccursUnbounded-01-soap11.xml • echoElementMinOccurs0MaxOccursUnbounded-01-soap12.xml
    49. Test Suite Example Description Instance Model Toolkit Output
    50. Test Reports
    51. Patterns Detector !
    52. Patterns Detector XML Patterns Schema Detector (URIs)
    53. Buckets !
    54. Basic Patterns • known to work with “state of the art” implementations • they’re, um, very Basic Publishers of Schemas Take Note!
    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. “State of the Art” ?
    57. SLIPPERY SLOPE
    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. Advanced Patterns • exhibited by real schemata • they’re, um, not very interoperable Developers of Implementations Take Note!
    60. Not Advanced ?
    61. SLIPPERY SLOPE
    62. Value Judgement • XML Schema is big • Coverage or Possible to Databind? • always another Schema “Bring out your schemata”
    63. Patterns in the Wild
    64. Build Your Own Bucket • List Patterns your schemas use • List Patterns your toolkit supports • Analyse schemas “in the wild”
    65. Other Topics ?
    66. Document Conformance Implementation Conformance
    67. WS-I Basic Profile • Detector works on WSDL 1.1 • Composable with Basic Profile 1.1
    68. Annotations • Tools Generate them • Useful for “round tripping” • No-one is submitting them
    69. Versioning • Concrete patterns exist • They’re all Advanced XML Schema 1.1 is the answer?
    70. Progress ?
    71. Schedule
    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. We Need Your Help! www.w3.org/2002/ws/databinding
    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. Thank you! Any Questions ? www.w3.org/2002/ws/databinding

    + Paul DowneyPaul Downey, 2 years ago

    custom

    1404 views, 0 favs, 0 embeds more stats

    http://2006.xmlconference.org/programme/presentatio more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1404
      • 1404 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 22
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories