~zorba-coders/zorba/bugs-1022495-and-1022494

« back to all changes in this revision

Viewing changes to modules/com/zorba-xquery/www/modules/xml.xq

  • Committer: chillery+launchpad at lambda
  • Date: 2012-09-12 00:14:08 UTC
  • mfrom: (10923.1.111 zorba)
  • Revision ID: chillery+launchpad@lambda.nu-20120912001408-r0hxvjukenfzpjrk
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
 : external entities. If the option 
142
142
 : is enabled, the input must conform to the syntax extParsedEnt (production 
143
143
 : [78] in XML 1.0, see <a href="http://www.w3.org/TR/xml/#wf-entities">
144
 
 : Well-Formed Parsed Entities</a>). The result of the function call is a list 
 
144
 : Well-Formed Parsed Entities</a>). In addition, by default a DOCTYPE declaration is allowed,
 
145
 : as described by the [28] doctypedecl production, see <a href="http://www.w3.org/TR/xml/#NT-doctypedecl">
 
146
 : Document Type Definition</a>. A parameter is available to forbid the appearance of the DOCTYPE.
 
147
 :
 
148
 : The result of the function call is a list 
145
149
 : of nodes corresponding to the top-level components of the content of the 
146
150
 : external entity: that is, elements, processing instructions, comments, and 
147
151
 : text nodes. CDATA sections and character references are expanded, and 
151
155
 : (<a href="http://www.w3.org/TR/xml/#sec-well-formed">production [1] in XML 1.0</a>).
152
156
 : This option can not be used together with either the &lt;schema-validate/&gt; or the &lt;DTD-validate/&gt;
153
157
 : option. Doing so will raise a zerr:ZXQD0003 error.
154
 
 : The &lt;parse-external-parsed-entity/&gt; option has two parameters, given by attributes. The first
 
158
 : The &lt;parse-external-parsed-entity/&gt; option has three parameters, given by attributes. The first
155
159
 : attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter
156
160
 : tells the parser to skip the given number of root nodes and return only their children. E.g.
157
161
 : skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent
159
163
 : boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning
160
164
 : only the top level elements, comments, PIs, etc. This parameter works in combination with
161
165
 : the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has 
162
 
 : been applied. 
 
166
 : been applied. The third paramter is "error-on-doctype" and will generate an error if a DOCTYPE
 
167
 : declaration appears in the input, which by default is allowed.
163
168
 : </li>
164
169
 :
165
170
 : <li>