Project

Profile

Help

Revision beaf15bc

Added by Debbie Lockett 8 months ago

Fix documentation bug #4466: XInclude processing (and URI query parameters with doc() generally)

View differences:

src/userdoc/functions.xml
1059 1059
                <code>parser=org.ccil.cowan.tagsoup.Parser</code> causes John Cowan's TagSoup parser
1060 1060
              for HTML to be used.</p>
1061 1061
          </li>
1062
          <li>
1063
            <p>
1064
              <code>xinclude=yes|no</code>: determines whether XInclude processing should be applied
1065
              to the input document. This overrides any setting in the <a class="javalink"
1066
                href="net.sf.saxon.Configuration">Configuration</a> (or any command line option).</p>
1067
          </li>
1062 1068
        </ul>
1063 1069
      </status>
1064 1070
      <saxon-edition>ALL</saxon-edition>
src/userdoc/schema-processing.xml
1033 1033
      <p>If the standard Saxon <code>URIResolver</code> is used, and recognition of query parameters
1034 1034
         is enabled, it is also possible to control validation for each source document by means of
1035 1035
         query parameters in the document URI. For example,
1036
            <code>document('source.xml?val=strict')</code> requests the loading of the file
1036
            <code>document('source.xml?validation=strict')</code> requests the loading of the file
1037 1037
            <code>source.xml</code> with strict validation.</p>
1038 1038

  
1039 1039
      <p>The attribute <a class="javalink" href="net.sf.saxon.lib.Feature#VALIDATION_WARNINGS"
......
1167 1167
      <p>If the standard Saxon <code>URIResolver</code> is used, and recognition of query parameters
1168 1168
         is enabled, it is also possible to control validation for each source document by means of
1169 1169
         query parameters in the document URI. For example,
1170
            <code>doc('source.xml?val=strict')</code> requests the loading of the file
1170
            <code>doc('source.xml?validation=strict')</code> requests the loading of the file
1171 1171
            <code>source.xml</code> with strict validation.</p>
1172 1172

  
1173 1173
      <p>The <a class="javalink" href="net.sf.saxon.Configuration">Configuration</a> method
src/userdoc/sourcedocs.xml
928 928
          application, which means the XPath <code>id()</code> and <code>idref()</code> functions do
929 929
          not work.)</p>
930 930
      </li>
931
      <li>
932
        <p>For a document read using the <code>doc()</code> or <code>document()</code> functions,
933
          the parser (XMLReader) to be used can be specified using the query parameter
934
          <code>?parser=full.class.name</code> in the document URI -- but only if the
935
          <code>StandardURIResolver</code> is used, and the feature is enabled by calling
936
          <code>Configuration.setParameterizedURIResolver()</code> or by setting <code>-p:on</code>
937
          on the <code>Query</code> or <code>Transform</code> command lines. For example,
938
          <code>parser=org.ccil.cowan.tagsoup.Parser</code> causes John Cowan's TagSoup parser
939
          for HTML to be used.</p>
940
      </li>
931 941
    </ul>
932 942

  
933 943
    <p>Saxonica traditionally recommended use of the Xerces parser from Apache in preference to the version bundled
......
1386 1396

  
1387 1397
    <p>Saxon's standard <code>URIResolver</code> uses this technique if it has been enabled (for
1388 1398
      example by using <code>-p</code> on the command line). With this option, any URI containing
1389
      the query parameter <code>?val=strict</code> (for example,
1390
        <code>doc('source.xml?val=strict')</code>) causes strict validation to be requested for that
1391
      document, while <code>?val=lax</code> requests lax validation, and <code>?val=strip</code>
1399
      the query parameter <code>?validation=strict</code> (for example,
1400
      <code>doc('source.xml?validation=strict')</code>) causes strict validation to be requested for that
1401
      document, while <code>?validation=lax</code> requests lax validation, and <code>?validation=strip</code>
1392 1402
      requests no validation.</p>
1393 1403
    
1394 1404
    <p>XSLT 3.0 provides a standard way of requesting validation for individual source documents,
src/userdoc/using-xquery.xml
275 275
                It cannot be used in conjunction with the <code>-r</code> option, and it
276 276
                automatically switches on the <code>-u</code> and <code>-sa</code> options. The
277 277
                effect is that Saxon-specific query parameters are recognized in a URI. One query
278
                parameter that is recognized is <code>val</code>. This may take the values
278
                parameter that is recognized is <code>validation</code>. This may take the values
279 279
                <code>strict</code>, <code>lax</code>, or <code>strip</code>. For example,
280
                <code>source.xml?val=strict</code> loads a document with strict schema
280
                <code>source.xml?validation=strict</code> loads a document with strict schema
281 281
                validation. </p>
282 282
            </td>
283 283
         </tr>
src/userdoc/using-xsl.xml
445 445
                  It cannot be used in conjunction with the <code>-r</code> option, and it
446 446
                  automatically switches on the <code>-u</code> and <code>-sa</code> options. The
447 447
                  effect is that Saxon-specific query parameters are recognized in a URI. One query
448
                  parameter that is recognized is <code>val</code>. This may take the values
448
                  parameter that is recognized is <code>validation</code>. This may take the values
449 449
                     <code>strict</code>, <code>lax</code>, or <code>strip</code>. For example,
450
                     <code>source.xml?val=strict</code> loads a document with strict schema
450
                     <code>source.xml?validation=strict</code> loads a document with strict schema
451 451
                  validation. </p>
452 452
            </td>
453 453
         </tr>
tools/featureKeys/FeatureKeys.xml
1176 1176
        <configfile>global/@recognizeUriQueryParameters</configfile>
1177 1177
        <configfiledesc>
1178 1178
            <p>If true, and the standard <code>URIResolver</code> is in use, query parameters such
1179
                as <code>val=strict</code> will be recognized on URIs supplied to the <a
1179
                as <code>validation=strict</code> will be recognized on URIs supplied to the <a
1180 1180
                    class="bodylink code" href="/functions/fn/doc">doc()</a> or <a
1181 1181
                    class="bodylink code" href="/functions/fn/document">document()</a>
1182 1182
                functions.</p>
1183 1183
        </configfiledesc>
1184 1184
        <desc>
1185
            <p>True if the standard URI resolver is to recognize query parameters included in
1186
                the URI (for example, <code>?val=strict</code>). Such parameters can then be used in
1187
                URIs passed to the <code>doc()</code> or <code>document()</code> functions. For
1188
                details of the query parameters available, see <a class="bodylink"
1189
                    href="/sourcedocs">Source Documents</a>. The default is false.</p>
1185
            <p>True if the standard URI resolver is to recognize query parameters included in the
1186
                URI (for example, <code>?validation=strict</code>). Such parameters can then be used
1187
                in URIs passed to the <code>doc()</code> or <code>document()</code> functions. The
1188
                default is false.</p>
1190 1189
            <p>This option has no effect if a user-supplied <code>URIResolver</code> is in use,
1191 1190
                unless the user-supplied <code>URIResolver</code> chooses to inherit this
1192 1191
                functionality from the standard <code>URIResolver</code>.</p>
1193
            <p>Allowed parameters include <code>validation=strict|lax|strip</code> to perform schema
1194
                validation, <code>strip-space=yes|ignorable|no</code> to control whitespace
1195
                stripping, and <code>xinclude=yes|no</code> to control whether XInclude processing
1196
                takes place (assuming the XML parser supports it).</p>
1192
            <p>The allowed parameters are: <code>validation=strict|lax|strip</code> to perform schema
1193
                validation (see <a class="bodylink" href="/sourcedocs/validation">Validation of
1194
                    Source Documents</a>); <code>strip-space=yes|ignorable|no</code> to control whitespace
1195
                stripping (see <a class="bodylink" href="/sourcedocs/whitespace">Whitespace
1196
                    Stripping in Source Documents</a>); <code>parser=full.class.name</code> to
1197
                determine the name of the parser (XMLReader) to be used (see <a class="bodylink"
1198
                    href="/sourcedocs/controlling-parsing">Controlling Parsing of Source
1199
                    Documents</a>); and <code>xinclude=yes|no</code> to control whether XInclude
1200
                processing takes place, assuming the XML parser supports it (see <a class="bodylink"
1201
                    href="/sourcedocs/XInclude">XInclude processing</a>).</p>
1197 1202
        </desc>
1198 1203
    </feature>
1199 1204
    <feature>

Also available in: Unified diff