File: nodes.xml

package info (click to toggle)
r-cran-xml 3.99-0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,688 kB
  • sloc: ansic: 6,659; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 658 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<x xmlns:xinclude="http://www.w3.org/2001/XInclude">
   <!-- Simple test of including a set of nodes from an XML document -->

Works:
   xinclude:include href="something.xml" xpointer="element(/1/2)"  parse="xml"

   xinclude:include href="something.xml#xpointer(/1/2)"
   xinclude:include href="something.xml" xpointer="/1/2"


Fails
/doc/1
/doc

 xinclude:include href="something.xml#xpointer(author)"

TEST
   <xinclude:include href="something.xml" xpointer="/1"/>

   <xinclude:include href="something.xml" xpointer="element(/doc)"  parse="xml">
    <xinclude:fallback><p>My own <i>substitute</i> text</p></xinclude:fallback>
   </xinclude:include>
</x>