/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to xml/info/xinclude.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
NameSpace
 
2
---------
 
3
 xmlns:xi="http://www.w3.org/1999/XML/xinclude"
 
4
 
 
5
xi:include
 
6
----------
 
7
 
 
8
 <xi:include href="source.xml" parse="text" encoding="UTF-8"/>
 
9
 
 
10
 href   - file to be included, may be specified with XPointer range.
 
11
 parse  - Parse file as "xml" (in this case root node of document 
 
12
        will be inserted), "text" (in this case will be inserted all text
 
13
        in specified file, all special symbols will be escaped) or something
 
14
        else.
 
15
 encoding - applicable only if parse!="xml", otherwise internal encoding of
 
16
        included xml file used
 
17
  
 
18
Sample Usage
 
19
------------
 
20
 <xi:include href="source.xml#xpointer(string-range(chapter/p[1],'Sentence 2')/
 
21
             range-to(string-range(chapter/p[2]/i,'3.',1,11)))"/>
 
22
 
 
23
 source.xml
 
24
 ----------
 
25
  <chapter>
 
26
   <p>Sentence 1.  Sentence 2.</p>
 
27
   <p><i>Sentence 3.  Sentence 4.</i>  Sentence 5.</p>
 
28
  </chapter>
 
29
 
 
30
 result
 
31
 ------
 
32
  <p>Sentence 2.</p>
 
33
  <p><i>Sentence 3.</i></p>