You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/02/22 00:01:11 UTC

[Solr Wiki] Update of "SolrConfigXml" by AndyLester

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "SolrConfigXml" page has been changed by AndyLester:
http://wiki.apache.org/solr/SolrConfigXml?action=diff&rev1=60&rev2=61

Comment:
Note about XInclude: The included XML file must be valid self-contained XML with a single root node.

  }}}
  Notes:
  
+  * The included XML file must be valid self-contained XML with a single root node.
   * Since the xinclude elements are handled by the XML parser and not by solr, properties expansion is not available.
   * File paths in href attributes can be absolute or relative to the current file's directory (this changed since Solr 3.1: before, the XIncludes were not resolved using the base directory of the current XML file, so the CWD was used - if you upgrade to 3.1, you may need to change you XInclude hrefs). If you want to ensure absolute links, use file:-URIs (e.g., "file:/etc/solr/solrconfig.xml") to refer to those files. By default Solr 3.1 will use the SolrResourceLoader to search for the referenced files, so it behaves like loading stopword files in the schema.  XIncludes can also be HTTP URLs to fetch resources from remote servers if desired.
   * The Xerces parser, used by default in Solr, doesn't support the xpointer="xpointer()" scheme.  http://xerces.apache.org/xerces2-j/faq-xinclude.html
@@ -533, +534 @@

  
  {{{
  <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE config [ 
+ <!DOCTYPE config [
- 	<!ENTITY exampleinclude SYSTEM "example.xml">
+         <!ENTITY exampleinclude SYSTEM "example.xml">
  ]>
  }}}
- 
  Where example.xml contains the XML segment you want to import. To use it, just use &entityname; (eg. &exampleinclude;) wherever you like.
  
  See: http://lucene.472066.n3.nabble.com/XInclude-Multiple-Elements-td3167658.html