annotate src/share/classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/bindingfile.rng @ 0:0961a4a21176

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 31822b475baa
rev   line source
duke@0 1 <?xml version="1.0"?>
duke@0 2 <!--
duke@0 3 DTD binding information file which is supported by this version of XJC.
duke@0 4 $Id: bindingfile.rng,v 1.1 2005/04/15 20:09:43 kohsuke Exp $
duke@0 5
duke@0 6 - Changes from the EA1 is marked by "CHANGE:"
duke@0 7 - "ref:key" and "ref:keyref" are used to specify cross-reference
duke@0 8 information.
duke@0 9 - "a:defaultValue" is used to specify the default behavior.
duke@0 10 Note that default behaviors are hard-coded to the source code.
duke@0 11 Values specified in this schema is not used in the actual processing.
duke@0 12 -->
duke@0 13 <grammar
duke@0 14 xmlns="http://relaxng.org/ns/structure/1.0"
duke@0 15 xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
duke@0 16 xmlns:a="http://relaxng.org/ns/annotation/1.0"
duke@0 17 xmlns:ref="urn:crossreference"
duke@0 18 datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
duke@0 19
duke@0 20 <start>
duke@0 21 <element name="xml-java-binding-schema">
duke@0 22 <optional>
duke@0 23 <attribute name="version">
duke@0 24 <value>1.0ea2</value>
duke@0 25 </attribute>
duke@0 26 </optional>
duke@0 27
duke@0 28 <interleave>
duke@0 29 <optional>
duke@0 30 <element name="options">
duke@0 31 <optional>
duke@0 32 <attribute name="package"/>
duke@0 33 </optional>
duke@0 34 </element>
duke@0 35 </optional>
duke@0 36 <optional>
duke@0 37 <element name="xjc:serializable">
duke@0 38 <optional>
duke@0 39 <attribute name="uid">
duke@0 40 <data type="long"/>
duke@0 41 </attribute>
duke@0 42 </optional>
duke@0 43 </element>
duke@0 44 </optional>
duke@0 45 <optional>
duke@0 46 <element name="xjc:superClass">
duke@0 47 <attribute name="name"/>
duke@0 48 </element>
duke@0 49 </optional>
duke@0 50 <!-- light-weight runtime -->
duke@0 51 <optional>
duke@0 52 <element name="xjc:noMarshaller">
duke@0 53 <empty/>
duke@0 54 </element>
duke@0 55 </optional>
duke@0 56 <optional>
duke@0 57 <element name="xjc:noUnmarshaller">
duke@0 58 <empty/>
duke@0 59 </element>
duke@0 60 </optional>
duke@0 61 <optional>
duke@0 62 <element name="xjc:noValidator">
duke@0 63 <empty/>
duke@0 64 </element>
duke@0 65 </optional>
duke@0 66 <optional>
duke@0 67 <element name="xjc:noValidatingUnmarshaller">
duke@0 68 <empty/>
duke@0 69 </element>
duke@0 70 </optional>
duke@0 71 <zeroOrMore>
duke@0 72 <choice>
duke@0 73 <ref name="toplevel.declaration"/>
duke@0 74 <ref name="global.or.local.declaration"/>
duke@0 75 </choice>
duke@0 76 </zeroOrMore>
duke@0 77 </interleave>
duke@0 78 </element>
duke@0 79 </start>
duke@0 80
duke@0 81
duke@0 82
duke@0 83
duke@0 84 <!-- element-class declaration -->
duke@0 85 <define name="toplevel.declaration" combine="choice">
duke@0 86 <element name="element">
duke@0 87 <attribute name="name"/>
duke@0 88 <attribute name="type">
duke@0 89 <value>class</value>
duke@0 90 </attribute>
duke@0 91 <optional>
duke@0 92 <attribute name="class">
duke@0 93 <ref name="java.classname.datatype"/>
duke@0 94 </attribute>
duke@0 95 </optional>
duke@0 96 <optional>
duke@0 97 <attribute name="root" a:defaultValue="false">
duke@0 98 <choice>
duke@0 99 <value>true</value>
duke@0 100 <value>false</value>
duke@0 101 </choice>
duke@0 102 </attribute>
duke@0 103 </optional>
duke@0 104
duke@0 105 <interleave>
duke@0 106 <!-- attribute-property declaration -->
duke@0 107 <zeroOrMore>
duke@0 108 <element name="attribute">
duke@0 109 <attribute name="name"/>
duke@0 110 <optional>
duke@0 111 <attribute name="property"/>
duke@0 112 </optional>
duke@0 113 <optional>
duke@0 114 <ref name="collection.att"/>
duke@0 115 </optional>
duke@0 116 <optional>
duke@0 117 <attribute name="convert">
duke@0 118 <text ref:keyref="conversion"/>
duke@0 119 </attribute>
duke@0 120 </optional>
duke@0 121 </element>
duke@0 122 </zeroOrMore>
duke@0 123
duke@0 124 <zeroOrMore>
duke@0 125 <ref name="global.or.local.declaration"/>
duke@0 126 </zeroOrMore>
duke@0 127
duke@0 128 <!-- element-local declarations -->
duke@0 129 <zeroOrMore>
duke@0 130 <element name="constructor">
duke@0 131 <attribute name="properties">
duke@0 132 <list>
duke@0 133 <oneOrMore>
duke@0 134 <!-- point to a property defined in this element -->
duke@0 135 <data type="token"/>
duke@0 136 </oneOrMore>
duke@0 137 </list>
duke@0 138 </attribute>
duke@0 139 </element>
duke@0 140 </zeroOrMore>
duke@0 141
duke@0 142 <optional>
duke@0 143 <element name="content">
duke@0 144 <interleave>
duke@0 145 <choice>
duke@0 146 <!-- general content-property declaration -->
duke@0 147 <ref name="collection.particle.decl"/>
duke@0 148
duke@0 149 <!-- model-based content property declaration -->
duke@0 150 <group>
duke@0 151 <zeroOrMore>
duke@0 152 <choice>
duke@0 153 <element name="element-ref">
duke@0 154 <attribute name="name"/>
duke@0 155 <optional>
duke@0 156 <attribute name="property"/>
duke@0 157 </optional>
duke@0 158 <optional>
duke@0 159 <ref name="collection.att"/>
duke@0 160 </optional>
duke@0 161 </element>
duke@0 162 <element>
duke@0 163 <choice>
duke@0 164 <name>sequence</name>
duke@0 165 <name>choice</name>
duke@0 166 </choice>
duke@0 167 <ref name="collection.particle.decl"/>
duke@0 168 </element>
duke@0 169 </choice>
duke@0 170 </zeroOrMore>
duke@0 171 <optional><!-- followed by an optional <rest> -->
duke@0 172 <element name="rest">
duke@0 173 <ref name="collection.particle.decl"/>
duke@0 174 </element>
duke@0 175 </optional>
duke@0 176 </group>
duke@0 177 </choice>
duke@0 178 </interleave>
duke@0 179 </element>
duke@0 180 </optional>
duke@0 181 </interleave>
duke@0 182 </element>
duke@0 183 </define>
duke@0 184
duke@0 185 <define name="collection.particle.decl">
duke@0 186 <attribute name="property"/>
duke@0 187 <optional>
duke@0 188 <ref name="collection.att"/>
duke@0 189 </optional>
duke@0 190 <optional>
duke@0 191 <attribute name="supertype"/>
duke@0 192 </optional>
duke@0 193 </define>
duke@0 194
duke@0 195 <define name="collection.att">
duke@0 196 <attribute name="collection">
duke@0 197 <!-- CHANGE: array is removed and set,vector are added -->
duke@0 198 <choice>
duke@0 199 <value>list</value>
duke@0 200 <value>set</value>
duke@0 201 <value>vector</value>
duke@0 202 </choice>
duke@0 203 </attribute>
duke@0 204 </define>
duke@0 205
duke@0 206
duke@0 207
duke@0 208 <!-- conversion declaration -->
duke@0 209 <define name="global.or.local.declaration" combine="choice">
duke@0 210 <element name="conversion">
duke@0 211 <attribute name="name" ref:key="conversion"/>
duke@0 212 <optional>
duke@0 213 <!-- defaults to @name -->
duke@0 214 <attribute name="type"/>
duke@0 215 </optional>
duke@0 216 <optional>
duke@0 217 <attribute name="parse" a:defaultValue="new"/>
duke@0 218 </optional>
duke@0 219 <optional>
duke@0 220 <attribute name="print" a:defaultValue="toString"/>
duke@0 221 </optional>
duke@0 222 <optional>
duke@0 223 <attribute name="whitespace" a:defaultValue="collapse">
duke@0 224 <choice>
duke@0 225 <value>preserve</value>
duke@0 226 <value>replace</value><!-- CHANGE: it was normalize -->
duke@0 227 <value>collapse</value>
duke@0 228 </choice>
duke@0 229 </attribute>
duke@0 230 </optional>
duke@0 231 </element>
duke@0 232 </define>
duke@0 233
duke@0 234 <!-- element-value declaration -->
duke@0 235 <define name="toplevel.declaration" combine="choice">
duke@0 236 <element name="element">
duke@0 237 <attribute name="name"/>
duke@0 238 <attribute name="type">
duke@0 239 <value>value</value>
duke@0 240 </attribute>
duke@0 241 <optional>
duke@0 242 <attribute name="convert">
duke@0 243 <text ref:keyref="conversion"/>
duke@0 244 </attribute>
duke@0 245 </optional>
duke@0 246 </element>
duke@0 247 </define>
duke@0 248
duke@0 249 <!-- interface declaration -->
duke@0 250 <define name="toplevel.declaration" combine="choice">
duke@0 251 <element name="interface">
duke@0 252 <attribute name="name">
duke@0 253 <ref name="java.classname.datatype"/>
duke@0 254 </attribute>
duke@0 255 <attribute name="members">
duke@0 256 <list>
duke@0 257 <oneOrMore>
duke@0 258 <ref name="java.classname.datatype"/>
duke@0 259 </oneOrMore>
duke@0 260 </list>
duke@0 261 </attribute>
duke@0 262 <!-- CHANGE: TODO: @properties is not supported yet -->
duke@0 263 </element>
duke@0 264 </define>
duke@0 265
duke@0 266 <!-- enumeration declaration -->
duke@0 267 <define name="global.or.local.declaration" combine="choice">
duke@0 268 <element name="enumeration">
duke@0 269 <attribute name="name">
duke@0 270 <ref name="java.classname.datatype"/>
duke@0 271 </attribute>
duke@0 272 <attribute name="members">
duke@0 273 <list>
duke@0 274 <oneOrMore>
duke@0 275 <data type="token"/>
duke@0 276 </oneOrMore>
duke@0 277 </list>
duke@0 278 </attribute>
duke@0 279 </element>
duke@0 280 </define>
duke@0 281
duke@0 282
duke@0 283
duke@0 284 <!-- valid Java name -->
duke@0 285 <define name="java.name.datatype">
duke@0 286 <!-- TODO: add pattern facet or implement a custom datatype -->
duke@0 287 <data type="token"/>
duke@0 288 </define>
duke@0 289
duke@0 290 <define name="java.classname.datatype">
duke@0 291 <ref name="java.name.datatype"/>
duke@0 292 </define>
duke@0 293 </grammar>