Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Extensible
XML is extensible. It allows you define your own tags, the order in which they occur, and
how they should be processed or displayed.
We also say that that XML allows all of us to extend our thought of what a document is
Markup
The most recognizable feature of XML is its tags, or elements (to be more accurate).
XML allows you to define your own set of tags.
Language
it is a data-description language.
The simplest XML elements contain an opening tag, a closing tag, and some content.
The opening tag begins with a left angle bracket (<), followed by an element name that
contains letters and numbers (but no spaces), and finishes with a right angle bracket
(>).Following the content is the closing tag, which exhibits the same spelling and
capitalization as your opening tag, but with one tiny change: a / appears right before the
element name.
There are terms used to describe parts of an XML document: tags, elements,
and attributes.
XML tags begin with the less-than character (“<”) and end with the greater-than character
(“>”).
You use tags to mark the start and end of elements, which are the logical units of
information in an XML document.
An element consists of a start tag, possibly followed by text and other complete
elements, followed by an end tag
The data template is an XML document that consists of four basic sections:
Parameters,
Triggers,
Data query,
Data structure
A parameter is a variable whose value you can set at runtime. Parameters are especially
useful for modifying SELECT statements and setting PL/SQL variables at runtime.
However, the Parameters section of the data template is optional.
<parameters>
<parameter name="P_PERIOD_FROM" dataType="character" />
<parameter name="P_PERIOD_TO" dataType="character" />
</parameters>
For example:
<dataQuery>
<sqlStatement name="Q1">
<![CDATA[
]]>
</sqlStatement>
</dataQuery>
3. Using Data Triggers:
Data triggers execute PL/SQL functions at specific times during the execution and
generation of XML output. Using the conditional processing capabilities of PL/SQL for
these triggers, you can do things such as perform initialization tasks and access the
database.
Data triggers are optional, and you can have as many <dataTrigger> elements as
necessary. The <dataTrigger> element has a set of related attributes. These are expressed
within the <dataTrigger> tag.
For example:
2 <dataTriggername="beforeReport2"source=" fin_test_pkg.beforeReport(:Parameter)"/>
Name: The event name to fire this trigger.
Source: The PL/SQL <package name>.<function name> where the executable code
resides.
<dataStructure>
<element name="LEDGER_SHORT_NAME"
value="LEDGER_SHORT_NAME" />
<element name="CODE_COMBINATION_ID"
value="CODE_COMBINATION_ID" />
<element name="ACCOUNTING_CODE_COMBINATION"
value="ACCOUNTING_CODE_COMBINATION" />
<element name="CODE_COMBINATION_DESCRIPTION"
value="CODE_COMBINATION_DESCRIPTION" />
</group>
</group>
</group>
</dataStructure>
Enter the placeholder syntax in your document where you want the XML data value to
appear.
In the example, the template field "Employee" maps to the XML element
EMPLOYEE_NAME. In your document, enter:
<?EMPLOYEE_NAME?>
EMPLOYEE NUMBER EMPLOYEE NAME AGE POSITION
<?EMPLOYEE_NUMBER?> <?EMPLOYEE_NAME?> <?AGE?> <?POSITION?>
Use Microsoft Word's Text Form Field Options window to insert the placeholder tags:
Grouping scenarios
<?for-each:G_EMPLOYEE_NAME?>
<?end for-each?>
for each
Example 1:
CH G GENDERE
DEPARTMEN Total
T
G G 999E 999E
DEPARTMEN
T
G 999E 999
Creating a chart