97 lines
2.0 KiB
DTD
97 lines
2.0 KiB
DTD
<!--
|
|
Top-level element: declare xml generation instructions
|
|
-->
|
|
<!ELEMENT java-to-xml (
|
|
processor-params,
|
|
generate-element*)
|
|
>
|
|
|
|
|
|
<!--
|
|
Declare basic information about the processor that is to be code-generated
|
|
from these XML generation instructions.
|
|
-->
|
|
<!ELEMENT processor-params (
|
|
processor-package,
|
|
processor-superclass?,
|
|
processor-class,
|
|
(xml-public-id, dtd-url)?
|
|
)>
|
|
|
|
|
|
<!--
|
|
Declare a package name for the code-generated processor class.
|
|
-->
|
|
<!ELEMENT processor-package (#PCDATA)>
|
|
|
|
|
|
<!--
|
|
Optional: Declare a superclass that the code-generated processor class will extend.
|
|
If omitted, the processor class will extend java.lang.Object.
|
|
-->
|
|
<!ELEMENT processor-superclass (#PCDATA)>
|
|
|
|
|
|
<!--
|
|
Declare the class name of the code-generated processor class.
|
|
-->
|
|
<!ELEMENT processor-class (#PCDATA)>
|
|
|
|
|
|
<!--
|
|
Declare the public ID of the XML documents that will be generated by
|
|
this processor.
|
|
-->
|
|
<!ELEMENT xml-public-id (#PCDATA)>
|
|
|
|
<!--
|
|
Specify a URL from which the DTD for the documents
|
|
being processed by this processor can be obtained.
|
|
-->
|
|
<!ELEMENT dtd-url (#PCDATA)>
|
|
|
|
<!ELEMENT generate-element ( declare-param*, java)>
|
|
<!ATTLIST generate-element
|
|
element CDATA #REQUIRED
|
|
element-context CDATA #IMPLIED
|
|
>
|
|
|
|
<!ELEMENT declare-param EMPTY>
|
|
<!ATTLIST declare-param
|
|
name CDATA #REQUIRED
|
|
class CDATA #REQUIRED
|
|
>
|
|
|
|
<!--
|
|
Java code to be to construct an element.
|
|
|
|
Note: all elements referenced must be above or at the current element in the
|
|
document tree. Soon it will also be possible to reference nodes below the current
|
|
node (in actions with phase "element-end" only).
|
|
-->
|
|
<!ELEMENT java ( #PCDATA |
|
|
set-attribute-value |
|
|
write-text |
|
|
write-xml
|
|
)*
|
|
>
|
|
|
|
<!ELEMENT write-text (#PCDATA)>
|
|
<!ATTLIST write-text
|
|
from-var CDATA #IMPLIED
|
|
>
|
|
|
|
<!ELEMENT set-attribute-value (#PCDATA)>
|
|
<!ATTLIST set-attribute-value
|
|
name CDATA #REQUIRED
|
|
from-var CDATA #IMPLIED
|
|
>
|
|
|
|
<!ELEMENT write-xml (param*)>
|
|
<!ATTLIST write-xml
|
|
element CDATA #REQUIRED
|
|
element-context CDATA #IMPLIED
|
|
>
|
|
|
|
<!ELEMENT param (#PCDATA)>
|