[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ANN: XML Encoded XPath 0.2 (Samples)
- From: Wayne Steele <xmlmaster@hotmail.com>
- To: xml-dev@lists.xml.org
- Date: Sun, 01 Apr 2001 17:48:52 -0700
<?xml version="1.0" ?>
<!DOCTYPE XEXPaths SYSTEM "XEXPath_0.2.dtd" [
<!ELEMENT XEXPaths ANY >
]>
<XEXPaths>
<!--
para[@type='warning'][5]
-->
<compose>
<child>para</child>
<filter>
<eq>
<compose><attribute>type</attribute></compose>
<literal>warning</literal>
</eq>
</filter>
<filter>
<number>5</number>
</filter>
</compose>
<!--
chapter/title
-->
<compose>
<child>chapter</child>
<child>title</child>
</compose>
<!--
id('foo')/para[5]
-->
<compose>
<function name="id">
<literal>foo</literal>
</function>
<child>para</child>
<filter>
<number>5</number>
</filter>
</compose>
<!--
my:funct('a')
-->
<function nsURI="http://example.com/my" name="funct">
<literal>a</literal>
</function>
<!--
substring("12345", 0 div 0, 3)
-->
<function name="substring">
<literal>12345</literal>
<div>
<number>0</number>
<number>0</number>
</div>
<number>3</number>
</function>
<!--
//*[@href]
-->
<compose>
<root/>
<descendant-or-self type="node" />
<child/>
<filter>
<compose>
<attribute>href</attribute>
</compose>
</filter>
</compose>
<!--
$var1
-->
<variable>var1</variable>
<!--
'Yow!'
-->
<literal>Yow!</literal>
<!--
54.40
-->
<number>54.40</number>
<!--
foobar()
-->
<function name="foobar" />
<!--
bite(1)
-->
<function name="bite" >
<number>1</number>
</function>
<!--
bite(1,2)
-->
<function name="bite" >
<number>1</number>
<number>2</number>
</function>
<!--
bite(-(1),(2+2),3,4)
-->
<function name="bite" >
<neg><number>1</number></neg>
<add><number>2</number><number>2</number></add>
<number>3</number>
<number>4</number>
</function>
<!--
((0 and 45) or 'foobar')
-->
<or>
<and><number>0</number><number>45</number></and>
<literal>FooBar</literal>
</or>
<!--
(35 < 34)
-->
<lt><number>35</number><number>34</number></lt>
<!--
/
-->
<compose><root/></compose>
<!--
self::*
-->
<compose><self type=''/></compose>
<!--
.
-->
<compose><self type='node'/></compose>
<!--
descendant-or-self::node()
-->
<compose><descendant-or-self type="node"/></compose>
<!--
/descendant-or-self::node()
-->
<compose><root/><descendant-or-self type="node"/></compose>
<!--
descendant-or-self::node()/foo
-->
<compose><descendant-or-self type="node"/><child>foo</child></compose>
<!--
//foo
-->
<compose><root/><descendant-or-self
type="node"/><child>foo</child></compose>
<!--
//*
-->
<compose><root/><descendant-or-self type="node"/><child/></compose>
<!--
//foo[@b]
-->
<compose>
<root/>
<descendant-or-self type="node" />
<child>foo</child>
<filter>
<compose>
<attribute>b</attribute>
</compose>
</filter>
</compose>
<!--
@*
-->
<compose>
<attribute/>
</compose>
<!--
@text()
-->
<compose>
<attribute type="text" />
</compose>
<!--
processing-instruction('foo')
-->
<compose>
<child type="processing-instruction">foo</child>
</compose>
<!--
..
-->
<compose>
<parent />
</compose>
<!--
/html:foo
-->
<compose>
<root/>
<child nsURI="URI:html_uri">foo</child>
</compose>
<!--
*[@xlink:*]
-->
<compose>
<child/>
<filter>
<compose>
<attribute nsURI="URI:xlink" />
</compose>
</filter>
</compose>
</XEXPaths>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com