![]() |
XPointers![]() ![]() ![]() ![]() ![]()
If we want to embed only the line of the street address then we can use the following syntax.,
<des> The areas named below have software firms</des> <areaname> Area name <mylink xml: link="simple" show="embed" href="addr.xml I id(s2)"> </mylink> </areaneme> <area> Locator syntax The value of the href attribute is identified by the locator element. The syntax of the locator is as follows: The URL followed by I or# followed by XPointer or a name. The pipe-stem symbol is used instead of the # symbol since XPointers retrieve only a part of a document. The syntax of the XPointer consists of a series of location terms separated by a period. The locations are defined in terms of the previous location. There are two types of locations namely:
1 . Absolute location.
Absolute location Absolute location is of four different types namely:
Root The following example mydoc.xml illustrates the use of all the four kinds of absolute locations. <mydoc> <first>This is line one</first> <second>This Is the second<mylink xml: link="simple" href="#" , link</mylink> </second> <third id="3">This is line three</third> <A name="last"/> </mydoc> Root
The root identifies the root element of an XML document. Consider our
"href = mydoc.xml # root()"
The above syntax is absolutely useless because if no pointer is added the root of the document is implied.
Origin
The origin absolute location is used to point to a location in the same document. The syntax for the origin attribute is as follows:
href = #origino.following(l,#element)
Element with an ID
The type pointer has been used in our example.
Any document that wants to point to the <A name = "last"/> element in the above example the following syntax has to be used. <mylink xml:link = "simple' herf ="mydoc.xml #html(last)">Iinl </mylink>
XPointers always start with an absolute locator. If no absolute locator is mentioned the root is implied. Some of the keywords associated with relative locations are the following:
child
Locates direct child nodes of the context node, including element, pi, comment, and text. Attributes are not considered children of the elements that bear them (for locating them, use the attribute axis).
descendent
Locates nodes of the same types as child, but appearing anywhere within the content of the context node.
Identical to the descendant axis except that the context node itself is included as a candidate, preceding all descendants.
parent
Locates the element node directly containing the context node, or directly bearing it if it is an attribute.
ancestor
Locates element nodes containing the context node (since only elements properly
have children as ' defined here). The first node in the list is the immediate parent of
the context node.
ancestor-or-self
Identical to the ancestor axis except that the context node itself is included as a candidate, preceding all ancestors. This axis is particularly useful when a precise location is specified by an ID, but there are constraints on the minimal unit to be treated as the final location, such as always locating the containing SECTION whether the ID is on the SECTION or on some particular descendant.
preceding-sibling
Locates sibling nodes (nodes that share the same parent as the context node) that appear before (preceding) the context node. The nodes are considered in reverse document order, so that the first node in the list is the immediately preceding sibling, and the last node in the list is the first child of the parent.
following-sibling
Locates sibling nodes (nodes that share the same parent as the context node) that appear after (following) the context node. The nodes are considered in document order.
preceding
Locates nodes that begin before (preceding) the entire context node. The list is in reverse document order: the node closest to the context node first, root() last. Ancestors are included.
following
Locates nodes that begin after (following) the entire context node. The list is in document order: the first node in the list is for the first node whose start-tag occurs after the context node's end-tag; no ancestors are included.
self
Locates (for each context node), a singleton node list containing that same context node. Note: This is useful for applying multiple predicates to a single axis, particularly when predicates other than the first one must test a context node's position among all those context nodes that were selected by the prior predicates.
attribute
The attributes of the context node. If the context node is not of the type element, the list is empty: The order and position of nodes on this axis are undefined. Typically, a single attribute will be selected by name.
|
|
Domain NamesXML HTML to XML Why XML? XML Example Program XML Structure XML Declaration Physical Structure in XML XML Syntax Well Formed and Valid Document Document Type Definition Logical Structures
Notation and Notation Declarations Entity References Importing an External DTD Cascading Style Sheets (XML) Rendering XML with CSS An Example Using CSS CSS Style Rules
XSL XSL Transformation XSL Formatting XSL Style Rules Schemas Limitations of DTD Validity of an XML Document
An Example using XML Schema Namespaces Xlinks and Xpointers Terminology Xlinks Extended Link Xpointers DOM and SAX What is DOM? The Basic Structure of an XML DOM-based Module What is SAX? When to use DOMWhen to use SAX Accessing the Database Using XML Delivering XML with Data Retrieving Data from SQL Database Using Web Assistant Wizard Displaying Records from the XML_EX Database Server Dynamic Web Publishing with Dynabase Enhydra Java/XML Application Server XML Server Technologies Purpose and Goal of the XML/EDI Guidelines Definitions for XML/EDI The Electronic Enterprise Server Scope of XML/EDI The Five Technologies of XML/EDI Integrating XML with EDI Ignore and Include Keywords XML/EDI Components The Implementation Process Identifying Data Sets Developing DTDs Application Specific Extensions XML and JAVA XML Application Architecture Channel Definition Format Creation of Channels Creating Channels Using CDF Document Description of the Channel Scheduling Logos Precaching Web Crawling Keeping Track of UsersWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |