XML Schema The main source for these s is The XML Companion by Bradley Other resources: http://www.w3.org/TR/xmlschema-2/ XML Schema XSDL Alternatives ... – PowerPoint PPT presentation
Write Java Code That uses NEW the api 41 The Ant build script used for these examples is also XML lt?xml version"1.0"?gt ltproject basedir"." default"compile"gt ltpath id"classpath"gt ltfileset dir"D/jwsdp-1.1/saaj-1.1.1/lib" includes".jar"/gt ltfileset dir"D/jwsdp-1.1/jaxb-1.0/lib" includes".jar"/gt ltfileset dir"d/jwsdp-1.1/common/lib" includes".jar"/gt
ltecho message"Compiling the java source files..."/gt
ltjavac srcdir"." destdir"." debug"on"gt
ltclasspath refid"classpath" /gt
lt/javacgt
lt/targetgt
lttarget name"run"gt
ltecho message"Running Validate.java on po.xml"/gt
ltjava classname"Validate" fork"fasle"gt
ltarg value"po.xml"/gt
ltclasspath refid"classpath" /gt
lt/javagt
lt/targetgt
lt/projectgt
44 More details on XML Schemas 45 Comments in XSDL
ltxsschema
xmlnsxs"http//www.w3.org/2001/XMLSchema"
xmlns"http//www.cds-r-us.com"
targetNamespace"http//www.cds-r-us.com"
gt
ltxsannotationgt
ltxsdocumentationgtThis is a comment. lt/xsdocumentationgt
lt/xsannotationgt
46 Element Definitions
The Element element is used to define an element
The Element element may be empty
ltxselement name "name" type"xsstring" /gt
Or, may contain content
ltxselement name"cd"gt
ltxscomplexTypegt
ltxsattribute name"artist" type"xsstring" /gt
ltxsattribute name"title" type"xsstring" /gt
lt/xscomplexTypegt
lt/xselementgt
47 Element Definitions
The Element element may be empty and contain no other attributes
ltxselement name "purchaseOrder"/gt
This purchaseOrder element may contain anything (more elements and text)
DTD lt!ELEMENT purchaseOrder ANYgt
48 Simple Content
An element may be defined to hold only a number, word or text
ltxselement name "city" type"xsstring" /gt
DTD lt!ELEMENT city (PCDATA)gt
49 Complex Content
The element may contain child elements or attributes
ltxselement name"purchaseOrder"gt
ltxscomplexTypegt
ltxssequencegt
ltxselement ref"recipient" /gt
ltxselement ref"order" /gt
lt/xssequencegt
ltxsattribute name"orderDate" type"xsstring" /gt
lt/xscomplexTypegt
lt/xselementgt
An indicator on how these elements are to be combined sequence gtpredefined order 50 Place Holder Element Definitions
ltelement namepageBreakgt
ltcomplexTypegtlt/complexTypegt
lt/elementgt
No content is permitted
DTD lt!ELEMENT pageBreak EMPTYgt
lt!ATTLIST pageBreakgt
51 Namespace Issues
All element definitions belong to a target document-type namespace
If a prefix is used for schema elements (as we have done above) then we need to specify that prefix on datatypes to distinguish those defined in XSDL from those the author may define.
PowerShow.com is a leading presentation sharing website. It has millions of presentations already uploaded and available with 1,000s more being uploaded by its users every day. Whatever your area of interest, here you’ll be able to find and view presentations you’ll love and possibly download. And, best of all, it is completely free and easy to use.
You might even have a presentation you’d like to share with others. If so, just upload it to PowerShow.com. We’ll convert it to an HTML5 slideshow that includes all the media types you’ve already added: audio, video, music, pictures, animations and transition effects. Then you can share it with your target audience as well as PowerShow.com’s millions of monthly visitors. And, again, it’s all free.
About the Developers
PowerShow.com is brought to you by CrystalGraphics, the award-winning developer and market-leading publisher of rich-media enhancement products for presentations. Our product offerings include millions of PowerPoint templates, diagrams, animated 3D characters and more.