Databases Reference
In-Depth Information
< !DOCTYPE record[
< !ELEMENT account operation
(request, operation + ) >
< !ATTLIST account operation
bankAccN CDATA #REQUIRED
id CDATA #REQUIRED >
< !ELEMENT request
(date,means ? ,notes ? ) >
< !ATTLIST request number CDATA #REQUIRED >
< !ELEMENT operation
(type, amount, recipient, (notes
< ?xml version =“1.0” ? >
< !DOCTYPE record SYSTEM “record.dtd” >
< account operation
bankAccN =“0012” id =“00025” >
< request number =“10” >
< date > 04-20-2007 < /date >
< means > Internet < /means >
< notes > urgent < /notes >
< /request >
< operation >
< type > bank transfer < /type >
< amount > $ 1,500 < /amount >
< recipient > 0023 < /recipient >
< notes > Invoice 315 of 03-31-2007
< /notes >
< /operation >
< /account operation >
|
value) ? ) >
< !ELEMENT date ( #PCDATA ) >
< !ELEMENT means ( #PCDATA ) >
< !ELEMENT notes ( #PCDATA ) >
< !ELEMENT type ( #PCDATA ) >
< !ELEMENT amount ( #PCDATA ) >
< !ELEMENT recipient ( #PCDATA ) >
< !ELEMENT value ( #PCDATA ) >
] >
(a)
(b)
Fig. 1. An example of DTD (a) and a corresponding valid XML document (b)
and attributes in the graphical representation, elements are represented as
ovals, while attributes as rectangles. There is an arc in the tree connecting
each element with all the elements/attributes belonging to it, and between
each #FIXED attribute and its value. Arcs connecting an element with its
subelements are labeled with the cardinality of the relationship. Arcs labeled
or and with multiple branching are used to represent a choice in an element
declaration (
). An arc with multiple branching is also used to represent a
sequence with a cardinality constraint associated with the whole sequence
( ? , + , * ). To preserve the order between elements in a sequence, for any two
elements e i and e j ,if e j follows e i in the element declaration, node e j appears
below node e i in the tree.
Each XML document is represented by a tree with a node for each element,
attribute, and value in the document. There is an arc between each element
and each of its subelements/attributes/values and between each attribute and
each of its value(s). Each arc in the DTD tree may correspond to zero, one, or
multiple arcs in the XML document, depending on the cardinality of the corre-
sponding containment relationship. Note that arcs in XML documents are not
labeled, as there is no further information that needs representation. Figure 2
illustrates the graphical representation of both DTD and XML document in
Fig. 1.
|
2.2 Elements and Attributes Identification
The majority of the access control models for XML documents identify the
objects under protection (i.e., elements and attributes) through the XPath
language [3]. XPath is an expression language, where the basic building block
is the path expression.
 
Search WWH ::




Custom Search