Changeset 1083


Ignore:
Timestamp:
02/25/10 21:25:13 (2 years ago)
Author:
jharrop
Message:

Works in JAXB xjc 2.1.10. Main change is removal of substitution groups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/docx4j/xsd/svg11-flat-20030114.xsd

    r1082 r1083  
    11<?xml version="1.0" encoding="UTF-8"?> 
     2 
     3<!-- Converted from http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-flat-20030114.dtd 
     4     using trang; http://code.google.com/p/jing-trang/  
     5 
     6     This is a better approach than  
     7     http://blogs.msdn.com/webdevtools/archive/2009/10/06/working-with-svg-files-in-visual-studio-and-visual-web-developer.aspx 
     8         which has left off lots of attributes eg most of the attributes in %SVG.line.attlist 
     9          
     10         I did have to remove the substitution groups which trang had generated for 
     11         SVGCursorClass, SVGClipClass and a couple of others, since despite trying:  
     12          
     13         <xs:annotation><xs:appinfo> <xjc:substitutable/></xs:appinfo></xs:annotation> 
     14      
     15     and running xjc with -extension, I was still getting errors. 
     16          
     17       
     18USAGE INSTRUCTIONS 
     19           
     20  To generate java classes, you need xjc, from the JAXB 2.1 RI. 
     21                 
     22  To generate the classes (from the same directory)      
     23                         
     24         xjc  svg.xsd -d ~/workspace/svg-jaxb/src -no-header -target 2.0 
     25          
     26  It would be nice to be able to add the fluent api 
     27          
     28          sh ~/jaxb-ri-20071219/bin/xjc.sh -classpath ~/workspace/docx4j/m2/org/jvnet/jaxb2_commons/ppp/parent-pointer-plugin/1.0/parent-pointer-plugin-1.0.jar:~/workspace/docx4j/lib/jaxb-fluent-api-2.1.8.jar  -Xfluent-api -Xparent-pointer wml.xsd -d tmp/  -no-header -target 2.0 
     29          
     30  jaxb-ri-20071219 is 2.1.6; jaxb-ri-20070917 works equally well. 
     31   
     32         
     33        cd to the directory containing the new sources 
     34         
     35        Then add the copyright notice: 
     36         
     37         sed -s -i -f script *.java 
     38         
     39        where script is 
     40         
     41        # sed script to insert "header.txt" above the first line 
     42        1{h; r header.txt 
     43          D; } 
     44        2{x; G; } 
     45        #- - -end of sed script- - -  
     46         
     47        and header.txt contains the copyright notice.    
     48         
     49              
     50     --> 
     51 
    252<!-- ....................................................................... --> 
    353<!-- SVG 1.1 DTD ........................................................... --> 
     
    97147--> 
    98148<!-- feature specification --> 
    99 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 
     149<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"  
     150    elementFormDefault="qualified"  
     151    targetNamespace="http://www.w3.org/2000/svg"  
     152    xmlns:svg="http://www.w3.org/2000/svg"  
     153    xmlns:xlink="http://www.w3.org/1999/xlink" 
     154        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" 
     155        xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:version="2.1" 
     156        jaxb:extensionBindingPrefixes="xjc">     
     157 
    100158  <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/> 
     159   
    101160  <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/> 
     161   
     162        <xs:annotation> 
     163                <xs:appinfo> 
     164                        <xs:appinfo> 
     165                                <jaxb:globalBindings> 
     166                                </jaxb:globalBindings> 
     167                        </xs:appinfo> 
     168                        <jaxb:schemaBindings> 
     169                                <!-- can be overridden on the command line with -p --> 
     170                                <!-- A schema scope covers all the schema elements in the 
     171                                *target namespace* of a schema.  [JAXB 2.1 Spec 7.4.1] 
     172                                 
     173                                Since all the relevant bits of wordml are in a 
     174                                single namespace, this means we can't put for 
     175                                example the table elements in a table package. --> 
     176                                <jaxb:package name="org.plutext.jaxb.svg11"/> 
     177                        </jaxb:schemaBindings> 
     178                </xs:appinfo> 
     179        </xs:annotation> 
     180   
     181   
    102182  <xs:simpleType name="Boolean.datatype"> 
    103183    <xs:restriction base="xs:token"> 
     
    496576    </xs:complexType> 
    497577  </xs:element> 
    498   <!-- module: svg-clip.mod .............................. --> 
    499   <xs:element name="SVG.Clip.class" abstract="true"> 
    500     <xs:complexType> 
    501       <xs:complexContent> 
    502         <xs:extension base="svg:SVG.clipPath.content"> 
    503           <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
    504           <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
    505           <xs:attributeGroup ref="svg:SVG.Style.attrib"/> 
    506           <xs:attributeGroup ref="svg:SVG.Text.attrib"/> 
    507           <xs:attributeGroup ref="svg:SVG.TextContent.attrib"/> 
    508           <xs:attributeGroup ref="svg:SVG.Font.attrib"/> 
    509           <xs:attributeGroup ref="svg:SVG.Paint.attrib"/> 
    510           <xs:attributeGroup ref="svg:SVG.Color.attrib"/> 
    511           <xs:attributeGroup ref="svg:SVG.Opacity.attrib"/> 
    512           <xs:attributeGroup ref="svg:SVG.Graphics.attrib"/> 
    513           <xs:attributeGroup ref="svg:SVG.Clip.attrib"/> 
    514           <xs:attributeGroup ref="svg:SVG.Mask.attrib"/> 
    515           <xs:attributeGroup ref="svg:SVG.Filter.attrib"/> 
    516           <xs:attributeGroup ref="svg:SVG.Cursor.attrib"/> 
    517           <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
    518           <xs:attribute name="transform" type="svg:TransformList.datatype"/> 
    519           <xs:attribute name="clipPathUnits"> 
    520             <xs:simpleType> 
    521               <xs:restriction base="xs:token"> 
    522                 <xs:enumeration value="userSpaceOnUse"/> 
    523                 <xs:enumeration value="objectBoundingBox"/> 
    524               </xs:restriction> 
    525             </xs:simpleType> 
    526           </xs:attribute> 
    527         </xs:extension> 
    528       </xs:complexContent> 
    529     </xs:complexType> 
    530   </xs:element> 
    531578  <!-- module: svg-mask.mod .............................. --> 
    532579  <xs:element name="SVG.Mask.class" abstract="true"> 
     
    599646  </xs:element> 
    600647  <xs:element name="SVG.FilterPrimitive.class" abstract="true"/> 
    601   <!-- module: svg-cursor.mod ............................ --> 
    602   <xs:element name="SVG.Cursor.class" abstract="true"> 
    603     <xs:complexType> 
    604       <xs:complexContent> 
    605         <xs:extension base="svg:SVG.cursor.content"> 
    606           <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
    607           <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
    608           <xs:attributeGroup ref="svg:SVG.XLinkRequired.attrib"/> 
    609           <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
    610           <xs:attribute name="x" type="svg:Coordinate.datatype"/> 
    611           <xs:attribute name="y" type="svg:Coordinate.datatype"/> 
    612         </xs:extension> 
    613       </xs:complexContent> 
    614     </xs:complexType> 
    615   </xs:element> 
    616648  <!-- module: svg-hyperlink.mod ......................... --> 
    617649  <xs:element name="SVG.Hyperlink.class" abstract="true"> 
     
    660692      <xs:attributeGroup ref="svg:SVG.XLink.attrib"/> 
    661693      <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
    662       <xs:attribute name="type" use="required" type="svg:ContentType.datatype"/> 
     694      <xs:attribute name="type" use="required" type="svg:ContentType.datatype"> 
     695        <xs:annotation> 
     696                <xs:appinfo> 
     697                        <jaxb:property name="contentType"/> 
     698                </xs:appinfo> 
     699        </xs:annotation>                     
     700          </xs:attribute> 
     701       
    663702    </xs:complexType> 
    664703  </xs:element> 
     
    667706  <!-- module: svg-font.mod .............................. --> 
    668707  <xs:element name="SVG.Font.class" abstract="true"/> 
    669   <!-- module: svg-extensibility.mod ..................... --> 
    670   <xs:element name="SVG.Extensibility.class" abstract="true"> 
    671     <xs:complexType mixed="true"> 
    672       <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
    673       <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
    674       <xs:attributeGroup ref="svg:SVG.Style.attrib"/> 
    675       <xs:attributeGroup ref="svg:SVG.Presentation.attrib"/> 
    676       <xs:attributeGroup ref="svg:SVG.GraphicalEvents.attrib"/> 
    677       <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
    678       <xs:attribute name="x" type="svg:Coordinate.datatype"/> 
    679       <xs:attribute name="y" type="svg:Coordinate.datatype"/> 
    680       <xs:attribute name="width" use="required" type="svg:Length.datatype"/> 
    681       <xs:attribute name="height" use="required" type="svg:Length.datatype"/> 
    682       <xs:attribute name="transform" type="svg:TransformList.datatype"/> 
    683     </xs:complexType> 
    684   </xs:element> 
     708   
     709   
     710   
    685711  <!-- end of svg11-model.mod --> 
    686712  <!-- instantiate the Attribute Collection declared in the DTD driver --> 
     
    17291755      <xs:element ref="svg:SVG.Gradient.class"/> 
    17301756      <xs:element ref="svg:SVG.Pattern.class"/> 
    1731       <xs:element ref="svg:SVG.Clip.class"/> 
     1757      <xs:element ref="svg:clipPath"/> 
    17321758      <xs:element ref="svg:SVG.Mask.class"/> 
    17331759      <xs:element ref="svg:SVG.Filter.class"/> 
    1734       <xs:element ref="svg:SVG.Cursor.class"/> 
     1760      <xs:element ref="svg:cursor"/> 
    17351761      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    17361762      <xs:element ref="svg:SVG.View.class"/> 
     
    17951821      <xs:element ref="svg:SVG.Gradient.class"/> 
    17961822      <xs:element ref="svg:SVG.Pattern.class"/> 
    1797       <xs:element ref="svg:SVG.Clip.class"/> 
     1823      <xs:element ref="svg:clipPath"/> 
    17981824      <xs:element ref="svg:SVG.Mask.class"/> 
    17991825      <xs:element ref="svg:SVG.Filter.class"/> 
    1800       <xs:element ref="svg:SVG.Cursor.class"/> 
     1826      <xs:element ref="svg:cursor"/> 
    18011827      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    18021828      <xs:element ref="svg:SVG.View.class"/> 
     
    18371863      <xs:element ref="svg:SVG.Gradient.class"/> 
    18381864      <xs:element ref="svg:SVG.Pattern.class"/> 
    1839       <xs:element ref="svg:SVG.Clip.class"/> 
     1865      <xs:element ref="svg:clipPath"/> 
    18401866      <xs:element ref="svg:SVG.Mask.class"/> 
    18411867      <xs:element ref="svg:SVG.Filter.class"/> 
    1842       <xs:element ref="svg:SVG.Cursor.class"/> 
     1868      <xs:element ref="svg:cursor"/> 
    18431869      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    18441870      <xs:element ref="svg:SVG.View.class"/> 
     
    19051931      <xs:element ref="svg:SVG.Gradient.class"/> 
    19061932      <xs:element ref="svg:SVG.Pattern.class"/> 
    1907       <xs:element ref="svg:SVG.Clip.class"/> 
     1933      <xs:element ref="svg:clipPath"/> 
    19081934      <xs:element ref="svg:SVG.Mask.class"/> 
    19091935      <xs:element ref="svg:SVG.Filter.class"/> 
    1910       <xs:element ref="svg:SVG.Cursor.class"/> 
     1936      <xs:element ref="svg:cursor"/> 
    19111937      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    19121938      <xs:element ref="svg:SVG.View.class"/> 
     
    19882014        <xs:element ref="svg:SVG.Shape.class"/> 
    19892015        <xs:element ref="svg:SVG.Hyperlink.class"/> 
    1990         <xs:element ref="svg:SVG.Extensibility.class"/> 
     2016        <xs:element ref="svg:foreignObject"/> 
    19912017      </xs:choice> 
    19922018    </xs:sequence> 
     
    27322758      <xs:element ref="svg:SVG.Gradient.class"/> 
    27332759      <xs:element ref="svg:SVG.Pattern.class"/> 
    2734       <xs:element ref="svg:SVG.Clip.class"/> 
     2760      <xs:element ref="svg:clipPath"/> 
    27352761      <xs:element ref="svg:SVG.Mask.class"/> 
    27362762      <xs:element ref="svg:SVG.Filter.class"/> 
    2737       <xs:element ref="svg:SVG.Cursor.class"/> 
     2763      <xs:element ref="svg:cursor"/> 
    27382764      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    27392765      <xs:element ref="svg:SVG.View.class"/> 
     
    29813007      <xs:element ref="svg:SVG.Gradient.class"/> 
    29823008      <xs:element ref="svg:SVG.Pattern.class"/> 
    2983       <xs:element ref="svg:SVG.Clip.class"/> 
     3009      <xs:element ref="svg:clipPath"/> 
    29843010      <xs:element ref="svg:SVG.Mask.class"/> 
    29853011      <xs:element ref="svg:SVG.Filter.class"/> 
    2986       <xs:element ref="svg:SVG.Cursor.class"/> 
     3012      <xs:element ref="svg:cursor"/> 
    29873013      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    29883014      <xs:element ref="svg:SVG.View.class"/> 
     
    30363062    </xs:sequence> 
    30373063  </xs:complexType> 
    3038   <xs:element name="clipPath" substitutionGroup="svg:SVG.Clip.class"/> 
     3064   
     3065  <!-- module: svg-clip.mod .............................. --> 
     3066  <xs:element name="clipPath"> 
     3067    <xs:complexType> 
     3068      <xs:complexContent> 
     3069        <xs:extension base="svg:SVG.clipPath.content"> 
     3070          <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
     3071          <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
     3072          <xs:attributeGroup ref="svg:SVG.Style.attrib"/> 
     3073          <xs:attributeGroup ref="svg:SVG.Text.attrib"/> 
     3074          <xs:attributeGroup ref="svg:SVG.TextContent.attrib"/> 
     3075          <xs:attributeGroup ref="svg:SVG.Font.attrib"/> 
     3076          <xs:attributeGroup ref="svg:SVG.Paint.attrib"/> 
     3077          <xs:attributeGroup ref="svg:SVG.Color.attrib"/> 
     3078          <xs:attributeGroup ref="svg:SVG.Opacity.attrib"/> 
     3079          <xs:attributeGroup ref="svg:SVG.Graphics.attrib"/> 
     3080          <xs:attributeGroup ref="svg:SVG.Clip.attrib"/> 
     3081          <xs:attributeGroup ref="svg:SVG.Mask.attrib"/> 
     3082          <xs:attributeGroup ref="svg:SVG.Filter.attrib"/> 
     3083          <xs:attributeGroup ref="svg:SVG.Cursor.attrib"/> 
     3084          <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
     3085          <xs:attribute name="transform" type="svg:TransformList.datatype"/> 
     3086          <xs:attribute name="clipPathUnits"> 
     3087            <xs:simpleType> 
     3088              <xs:restriction base="xs:token"> 
     3089                <xs:enumeration value="userSpaceOnUse"/> 
     3090                <xs:enumeration value="objectBoundingBox"/> 
     3091              </xs:restriction> 
     3092            </xs:simpleType> 
     3093          </xs:attribute> 
     3094        </xs:extension> 
     3095      </xs:complexContent> 
     3096    </xs:complexType> 
     3097  </xs:element> 
     3098   
    30393099  <!-- end of SVG.clipPath.element --> 
    30403100  <!-- end of SVG.clipPath.attlist --> 
     
    30853145      <xs:element ref="svg:SVG.Gradient.class"/> 
    30863146      <xs:element ref="svg:SVG.Pattern.class"/> 
    3087       <xs:element ref="svg:SVG.Clip.class"/> 
     3147      <xs:element ref="svg:clipPath"/> 
    30883148      <xs:element ref="svg:SVG.Mask.class"/> 
    30893149      <xs:element ref="svg:SVG.Filter.class"/> 
    3090       <xs:element ref="svg:SVG.Cursor.class"/> 
     3150      <xs:element ref="svg:cursor"/> 
    30913151      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    30923152      <xs:element ref="svg:SVG.View.class"/> 
     
    38953955    </xs:sequence> 
    38963956  </xs:complexType> 
    3897   <xs:element name="cursor" substitutionGroup="svg:SVG.Cursor.class"/> 
     3957  <!-- module: svg-cursor.mod ............................ --> 
     3958  <xs:element name="cursor"> <!-- abstract="true"--> 
     3959    <xs:complexType> 
     3960    <xs:complexContent> 
     3961        <xs:extension base="svg:SVG.cursor.content"> 
     3962          <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
     3963          <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
     3964          <xs:attributeGroup ref="svg:SVG.XLinkRequired.attrib"/> 
     3965          <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
     3966          <xs:attribute name="x" type="svg:Coordinate.datatype"/> 
     3967          <xs:attribute name="y" type="svg:Coordinate.datatype"/> 
     3968        </xs:extension> 
     3969      </xs:complexContent> 
     3970    </xs:complexType> 
     3971  </xs:element> 
     3972   
     3973   
    38983974  <!-- end of SVG.cursor.element --> 
    38993975  <!-- end of SVG.cursor.attlist --> 
     
    39464022      <xs:element ref="svg:SVG.Gradient.class"/> 
    39474023      <xs:element ref="svg:SVG.Pattern.class"/> 
    3948       <xs:element ref="svg:SVG.Clip.class"/> 
     4024      <xs:element ref="svg:clipPath"/> 
    39494025      <xs:element ref="svg:SVG.Mask.class"/> 
    39504026      <xs:element ref="svg:SVG.Filter.class"/> 
    3951       <xs:element ref="svg:SVG.Cursor.class"/> 
     4027      <xs:element ref="svg:cursor"/> 
    39524028      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    39534029      <xs:element ref="svg:SVG.View.class"/> 
     
    42684344          <xs:attributeGroup ref="svg:SVG.AnimationAddtion.attrib"/> 
    42694345          <xs:attribute name="type" default="translate"> 
     4346        <xs:annotation> 
     4347                <xs:appinfo> 
     4348                        <jaxb:property name="typeAnimate"/> 
     4349                </xs:appinfo> 
     4350        </xs:annotation>           
    42704351            <xs:simpleType> 
    42714352              <xs:restriction base="xs:token"> 
     
    44334514      <xs:element ref="svg:SVG.Gradient.class"/> 
    44344515      <xs:element ref="svg:SVG.Pattern.class"/> 
    4435       <xs:element ref="svg:SVG.Clip.class"/> 
     4516      <xs:element ref="svg:clipPath"/> 
    44364517      <xs:element ref="svg:SVG.Mask.class"/> 
    44374518      <xs:element ref="svg:SVG.Filter.class"/> 
    4438       <xs:element ref="svg:SVG.Cursor.class"/> 
     4519      <xs:element ref="svg:cursor"/> 
    44394520      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    44404521      <xs:element ref="svg:SVG.View.class"/> 
     
    44554536          <xs:attribute name="orientation"/> 
    44564537          <xs:attribute name="arabic-form"/> 
    4457           <xs:attribute name="lang" type="svg:LanguageCodes.datatype"/> 
     4538          <xs:attribute name="lang" type="svg:LanguageCodes.datatype"> 
     4539        <xs:annotation> 
     4540                <xs:appinfo> 
     4541                        <jaxb:property name="langSvg"/> 
     4542                </xs:appinfo> 
     4543        </xs:annotation>                     
     4544          </xs:attribute> 
    44584545          <xs:attribute name="horiz-adv-x" type="svg:Number.datatype"/> 
    44594546          <xs:attribute name="vert-origin-x" type="svg:Number.datatype"/> 
     
    44814568      <xs:element ref="svg:SVG.Gradient.class"/> 
    44824569      <xs:element ref="svg:SVG.Pattern.class"/> 
    4483       <xs:element ref="svg:SVG.Clip.class"/> 
     4570      <xs:element ref="svg:clipPath"/> 
    44844571      <xs:element ref="svg:SVG.Mask.class"/> 
    44854572      <xs:element ref="svg:SVG.Filter.class"/> 
    4486       <xs:element ref="svg:SVG.Cursor.class"/> 
     4573      <xs:element ref="svg:cursor"/> 
    44874574      <xs:element ref="svg:SVG.Hyperlink.class"/> 
    44884575      <xs:element ref="svg:SVG.View.class"/> 
     
    46284715  <!-- SVG.Presentation.attrib ........................... --> 
    46294716  <!-- foreignObject: Foreign Object Element ............. --> 
    4630   <xs:element name="foreignObject" substitutionGroup="svg:SVG.Extensibility.class"/> 
     4717   
     4718  <!-- module: svg-extensibility.mod ..................... --> 
     4719  <xs:element name="foreignObject"> 
     4720    <xs:complexType mixed="true"> 
     4721      <xs:attributeGroup ref="svg:SVG.Core.attrib"/> 
     4722      <xs:attributeGroup ref="svg:SVG.Conditional.attrib"/> 
     4723      <xs:attributeGroup ref="svg:SVG.Style.attrib"/> 
     4724      <xs:attributeGroup ref="svg:SVG.Presentation.attrib"/> 
     4725      <xs:attributeGroup ref="svg:SVG.GraphicalEvents.attrib"/> 
     4726      <xs:attributeGroup ref="svg:SVG.External.attrib"/> 
     4727      <xs:attribute name="x" type="svg:Coordinate.datatype"/> 
     4728      <xs:attribute name="y" type="svg:Coordinate.datatype"/> 
     4729      <xs:attribute name="width" use="required" type="svg:Length.datatype"/> 
     4730      <xs:attribute name="height" use="required" type="svg:Length.datatype"/> 
     4731      <xs:attribute name="transform" type="svg:TransformList.datatype"/> 
     4732    </xs:complexType> 
     4733  </xs:element> 
     4734   
     4735   
    46314736</xs:schema> 
    46324737<!-- end of SVG.foreignObject.element --> 
Note: See TracChangeset for help on using the changeset viewer.