Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing Issue #50, Issue #36, and Issue #14.

For #36 I rewrote the setup.xqy. Also added unit tests for Roxy bootstrap
  • Loading branch information...
commit 17fd910c1a7b5079b21364f858fc2608130f34b9 1 parent ccb4bd7
@paxtonhare paxtonhare authored
View
18 deploy/lib/MLClient.rb
@@ -17,18 +17,26 @@ class MLClient
def initialize(options)
@ml_username = options[:user_name]
@ml_password = options[:password]
- @logger = options[:logger]
+ @logger = options[:logger] || logger
@request = {}
end
- def self.set_logger(logger)
+ def MLClient.logger()
+ @@logger ||= Logger.new(STDOUT)
+ end
+
+ def MLClient.logger=(logger)
@@logger = logger
end
+ def logger()
+ @logger
+ end
+
def get_http
if (!@http)
@http = Roxy::Http.new({
- :logger => @logger
+ :logger => logger
})
end
@http
@@ -37,7 +45,7 @@ def get_http
def build_request_params(url, verb)
uri = URI.parse url
if (!@request[verb])
- @logger.debug("creating new #{verb} request\n")
+ logger.debug("creating new #{verb} request\n")
@request[verb] = Net::HTTP.const_get(verb.capitalize).new(uri.request_uri)
@request[verb].add_field 'Connection', 'keep-alive'
@request[verb].add_field 'Keep-Alive', '30'
@@ -52,7 +60,7 @@ def build_request_params(url, verb)
:protocol => uri.scheme,
:user_name => @ml_username,
:password => @ml_password,
- :logger => @logger
+ :logger => logger
}
end
View
152 deploy/lib/server_config.rb
@@ -56,7 +56,7 @@ def initialize(options)
:logger => options[:logger]
})
- @server_version = @properties["ml.server-version"]
+ @server_version = @properties["ml.server-version"].to_i
if (@properties["ml.bootstrap-port"])
@bootstrap_port = @properties["ml.bootstrap-port"]
@@ -69,12 +69,12 @@ def initialize(options)
end
end
- @logger.debug "config: #{@config_file}"
- @logger.debug "pwd: #{ServerConfig.pwd}"
- @logger.debug "user: #{@ml_username}"
- @logger.debug "password: #{@ml_password}"
- @logger.debug "hostname: #{@hostname}"
- @logger.debug "port: #{@bootstrap_port}"
+ logger.debug "config: #{@config_file}"
+ logger.debug "pwd: #{ServerConfig.pwd}"
+ logger.debug "user: #{@ml_username}"
+ logger.debug "password: #{@ml_password}"
+ logger.debug "hostname: #{@hostname}"
+ logger.debug "port: #{@bootstrap_port}"
end
def self.pwd
@@ -86,9 +86,9 @@ def get_properties
end
def info
- @logger.info "Properties:"
+ logger.info "Properties:"
@properties.each do |k, v|
- @logger.info k + ": " + v
+ logger.info k + ": " + v
end
end
@@ -101,9 +101,9 @@ def self.init
force_props = find_arg(['--force-properties']) != nil ? true : false
force_config = find_arg(['--force-config']) != nil ? true : false
if (!force and !force_props and File.exists?(build_properties)) then
- @@logger.error "build.properties file found."
- @@logger.error " Use --force to reset all configuration files."
- @@logger.error " Use --force-properties to reset just the properties file.\n"
+ logger.error "build.properties file found."
+ logger.error " Use --force to reset all configuration files."
+ logger.error " Use --force-properties to reset just the properties file.\n"
else
#create clean properties file
FileUtils.cp sample_properties, build_properties
@@ -119,9 +119,9 @@ def self.init
properties = ServerConfig.properties
target_config = File.expand_path(properties["ml.config.file"], __FILE__)
if (!force and !force_config and File.exists?(target_config)) then
- @@logger.error "ml-config.xml file found."
- @@logger.error " Use --force to reset all configuration files."
- @@logger.error " Use --force-config to reset just the configuration file.\n"
+ logger.error "ml-config.xml file found."
+ logger.error " Use --force to reset all configuration files."
+ logger.error " Use --force-config to reset just the configuration file.\n"
else
#create clean marklogic configuration file
FileUtils.cp sample_config, target_config
@@ -133,7 +133,7 @@ def self.initcpf
target_config = File.expand_path("../../pipeline-config.xml", __FILE__)
if (File.exists?(target_config)) then
- @@logger.error "initcpf has already been run. Use --force to rerun it.\n"
+ logger.error "initcpf has already been run. Use --force to rerun it.\n"
else
FileUtils.cp sample_config, target_config
end
@@ -274,9 +274,9 @@ def execute_query(query, properties = {})
def restart
group = ARGV.shift
if (group)
- @logger.info("Restarting MarkLogic Server group #{group} on #{@hostname}")
+ logger.info("Restarting MarkLogic Server group #{group} on #{@hostname}")
else
- @logger.info("Restarting MarkLogic Server on #{@hostname}")
+ logger.info("Restarting MarkLogic Server on #{@hostname}")
end
setup = open(File.expand_path('../xquery/setup.xqy', __FILE__)).readlines.join
r = execute_query %Q{#{setup} setup:do-restart("#{group}")}
@@ -299,39 +299,81 @@ def self.plugin
runme << " #{plugin_command}" if plugin_command
runme << " #{package} " if package
runme << " #{package_version} " if package_version
- @@logger.debug runme
+ logger.debug runme
output = `#{runme}`
- @@logger.info(output)
+ logger.info(output)
end
def config
- @logger.info get_config
+ logger.info get_config
end
def bootstrap
if @hostname && @hostname != ""
- @logger.info("Bootstrapping your project into MarkLogic on #{@hostname}...")
+ logger.info("Bootstrapping your project into MarkLogic on #{@hostname}...")
setup = open(File.expand_path('../xquery/setup.xqy', __FILE__)).readlines.join
r = execute_query %Q{#{setup} setup:do-setup(#{get_config})}
- @logger.debug r.body
+ logger.debug r.body
- if (r.body.match("(note: restart required)")) then
- @logger.warn("NOTE*** RESTART OF MARKLOGIC IS REQUIRED")
+ if (r.body.match("<error:error")) then
+ logger.error r.body
+ logger.error "... Bootstrap FAILED"
+ else
+ if (r.body.match("(note: restart required)")) then
+ logger.warn("************************************")
+ logger.warn("*** RESTART OF MARKLOGIC IS REQUIRED")
+ logger.warn("************************************")
+ end
+ logger.info("... Bootstrap Complete")
end
- @logger.info("... Bootstrap Complete")
else
raise ExitException.new("Bootstrap requires the target environment's hostname to be defined")
end
end
def wipe
- @logger.info("Wiping MarkLogic setup for your project on #{@hostname}...")
+ logger.info("Wiping MarkLogic setup for your project on #{@hostname}...")
setup = open(File.expand_path('../xquery/setup.xqy', __FILE__)).readlines.join
r = execute_query %Q{#{setup} setup:do-wipe(#{get_config})}
- @logger.info r.body
- @logger.info "...wipe complete"
+ logger.debug r.body
+
+ if (r.body.match("<error:error")) then
+ logger.error r.body
+ logger.error "... Wipe FAILED"
+ else
+ if (r.body.match("(note: restart required)")) then
+ logger.warn("************************************")
+ logger.warn("*** RESTART OF MARKLOGIC IS REQUIRED")
+ logger.warn("************************************")
+ end
+ logger.info("... Wipe Complete")
+ end
+ end
+
+ def validate_install
+ logger.info("Validating your project installation into MarkLogic on #{@hostname}...")
+ setup = open(File.expand_path('../xquery/setup.xqy', __FILE__)).readlines.join
+ begin
+ r = execute_query %Q{#{setup} setup:validate-install(#{get_config})}
+ logger.info(r.body)
+ logger.info("... Validation SUCCESS")
+ result = true
+ rescue ExitException
+ logger.error "... Validation FAILED"
+ result = false
+ end
+ result
+
+ # logger.debug r.body
+
+ # if (r.body.match("<error:error") or r.body.match(%Q{"error":})) then
+ # # logger.error r.body
+ # logger.error "... Validation FAILED"
+ # else
+ # logger.info("... Validation SUCCESS")
+ # end
end
def deploy
@@ -407,7 +449,7 @@ def clean
#
def test
if (@environment == "prod") then
- @logger.error "There is no Test database on the Production server"
+ logger.error "There is no Test database on the Production server"
else
if (find_arg(['--skip-suite-teardown']) != nil)
suiteTearDown = "&runsuiteteardown=false"
@@ -429,7 +471,7 @@ def test
suites.each do |suite|
r = go %Q{http://#{@hostname}:#{@properties["ml.test-port"]}/test/run?suite=#{url_encode(suite)}&format=junit#{suiteTearDown}#{testTearDown}}, "get"
- @logger.info r.body
+ logger.info r.body
end
end
end
@@ -477,7 +519,7 @@ def recordloader
properties = ServerConfig.substitute_properties(properties, @properties, "")
properties.each do |k, v|
- @logger.info("#{k}=#{v}")
+ logger.info("#{k}=#{v}")
end
prop_string = ""
@@ -486,7 +528,7 @@ def recordloader
end
runme = %Q{java -cp #{File.expand_path("../java/recordloader.jar", __FILE__)}#{path_separator}#{File.expand_path("../java/marklogic-xcc-5.0.2.jar", __FILE__)}#{path_separator}#{File.expand_path("../java/xpp3-1.1.4c.jar", __FILE__)} #{prop_string} com.marklogic.ps.RecordLoader}
- @logger.info runme
+ logger.info runme
`#{runme}`
end
@@ -496,7 +538,7 @@ def xqsync
properties = ServerConfig.substitute_properties(properties, @properties, "")
properties.each do |k, v|
- @logger.info("#{k}=#{v}")
+ logger.info("#{k}=#{v}")
end
prop_string = ""
properties.each do |k,v|
@@ -504,7 +546,7 @@ def xqsync
end
runme = %Q{java -Xmx2048m -cp #{File.expand_path("../java/xqsync.jar", __FILE__)}#{path_separator}#{File.expand_path("../java/marklogic-xcc-5.0.2.jar", __FILE__)}#{path_separator}#{File.expand_path("../java/xstream-1.4.2.jar", __FILE__)}#{path_separator}#{File.expand_path("../java/xpp3-1.1.4c.jar", __FILE__)} -Dfile.encoding=UTF-8 #{prop_string} com.marklogic.ps.xqsync.XQSync}
- @logger.info runme
+ logger.info runme
`#{runme}`
end
@@ -637,29 +679,29 @@ def deploy_modules
end
def clean_modules
- @logger.info("Cleaning #{@properties['ml.modules-db']} on #{@hostname}")
+ logger.info("Cleaning #{@properties['ml.modules-db']} on #{@hostname}")
execute_query %Q{xdmp:forest-clear(xdmp:forest("#{@properties['ml.modules-db']}"))}
if (@properties['ml.test-modules-db'] && @properties['ml.test-modules-db'] != @properties['ml.modules-db'])
- @logger.info("Cleaning #{@properties['ml.test-modules-db']} on #{@hostname}")
+ logger.info("Cleaning #{@properties['ml.test-modules-db']} on #{@hostname}")
execute_query %Q{xdmp:forest-clear(xdmp:forest("#{@properties['ml.test-modules-db']}"))}
end
end
def clean_schemas
if (@properties['ml.schemas-db'])
- @logger.info("Cleaning #{@properties['ml.schemas-db']} on #{@hostname}")
+ logger.info("Cleaning #{@properties['ml.schemas-db']} on #{@hostname}")
execute_query %Q{xdmp:forest-clear(xdmp:forest("#{@properties['ml.schemas-db']}"))}
else
- @logger.error("No schemas db is configured")
+ logger.error("No schemas db is configured")
end
end
def clean_triggers
if (@properties['ml.triggers-db'])
- @logger.info("Cleaning #{@properties['ml.triggers-db']} on #{@hostname}")
+ logger.info("Cleaning #{@properties['ml.triggers-db']} on #{@hostname}")
execute_query %Q{xdmp:forest-clear(xdmp:forest("#{@properties['ml.triggers-db']}"))}
else
- @logger.error("No triggers db is configured")
+ logger.error("No triggers db is configured")
end
end
@@ -681,7 +723,7 @@ def deploy_content
end
def clean_content
- @logger.info("Cleaning #{@properties['ml.content-db']} on #{@hostname}")
+ logger.info("Cleaning #{@properties['ml.content-db']} on #{@hostname}")
execute_query %Q{
for $id in xdmp:database-forests(xdmp:database("#{@properties['ml.content-db']}"))
return
@@ -691,9 +733,9 @@ def clean_content
def deploy_cpf
if (!@properties["ml.triggers-db"] || @properties["ml.data.dir"] == "")
- @logger.error("To use CPF, you must define the triggers-db property in your build.properties file")
+ logger.error("To use CPF, you must define the triggers-db property in your build.properties file")
elsif (!File.exist?(File.expand_path("../../pipeline-config.xml", __FILE__)))
- @logger.error("
+ logger.error("
Before you can deploy CPF, you must define a configuration. Steps:
1. Run 'ml initcpf'
2. Edit deploy/pipeline-config.xml to set up your domain and pipelines
@@ -721,7 +763,7 @@ def xcc
:password => @ml_password,
:xcc_server => @hostname,
:xcc_port => @properties["ml.xcc-port"],
- :logger => @logger
+ :logger => logger
})
end
@xcc
@@ -802,21 +844,21 @@ def execute_query_5(query, properties = {})
end
if (db_id != nil) then
- @logger.debug("using dbid: #{db_id}")
+ logger.debug("using dbid: #{db_id}")
r = go "http://#{@hostname}:#{@bootstrap_port}/qconsole/endpoints/eval.xqy", "post", {}, {
:dbid => db_id,
:resulttype => "text",
:q => query
}
- @logger.debug(r.body)
+ logger.debug(r.body)
else
- @logger.debug("using sid: #{sid}")
+ logger.debug("using sid: #{sid}")
r = go "http://#{@hostname}:#{@bootstrap_port}/qconsole/endpoints/eval.xqy", "post", {}, {
:sid => sid,
:resulttype => "text",
:q => query
}
- @logger.debug(r.body)
+ logger.debug(r.body)
end
if (r.body.match(/\{"error"/)) then
@@ -826,7 +868,7 @@ def execute_query_5(query, properties = {})
return r
end
- def self.substitute_properties(sub_me, with_me, prefix = "")
+ def ServerConfig.substitute_properties(sub_me, with_me, prefix = "")
dangling_vars = {}
begin
needs_rescan = false
@@ -859,7 +901,7 @@ def self.substitute_properties(sub_me, with_me, prefix = "")
sub_me
end
- def self.load_properties(properties_filename, prefix = "")
+ def ServerConfig.load_properties(properties_filename, prefix = "")
properties = {}
File.open(properties_filename, 'r') do |properties_file|
properties_file.read.each_line do |line|
@@ -1050,9 +1092,9 @@ def build_config(config_file)
config
end
- def self.properties
- default_properties_file = File.expand_path("../../default.properties", __FILE__)
- properties_file = File.expand_path("../../build.properties", __FILE__)
+ def ServerConfig.properties(prop_file_location = "../..")
+ default_properties_file = File.expand_path("#{prop_file_location}/default.properties", __FILE__)
+ properties_file = File.expand_path("#{prop_file_location}/build.properties", __FILE__)
if !File.exist?(properties_file) then
raise ExitException.new("You must run ml init to configure your application.")
end
@@ -1067,7 +1109,7 @@ def self.properties
properties["environment"] = environment if environment
- env_properties_file = File.expand_path("../../#{environment}.properties", __FILE__)
+ env_properties_file = File.expand_path("#{prop_file_location}/#{environment}.properties", __FILE__)
if (File.exists?(env_properties_file))
properties.merge!(ServerConfig.load_properties(env_properties_file, "ml."))
end
View
4,700 deploy/lib/xquery/setup.xqy
2,858 additions, 1,842 deletions not shown
View
47 deploy/sample/ml-config.sample.xml
@@ -69,6 +69,20 @@
<directory-creation>manual</directory-creation>
<maintain-last-modified>false</maintain-last-modified>
<!--
+ <fragment-roots>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-root</localname>
+ </fragment-root>
+ </fragment-roots>
+ <fragment-parents>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents</localname>
+ </fragment-parent>
+ </fragment-parents>
+-->
+<!--
<fields>
<field>
<field-name/>
@@ -150,6 +164,19 @@
-->
</range-path-indexes>
+ <geospatial-element-indexes>
+<!--
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </geospatial-element-index>
+-->
+ </geospatial-element-indexes>
+
<geospatial-element-attribute-pair-indexes>
<!--
Sample for:
@@ -205,6 +232,26 @@
</geospatial-element-child-index>
-->
</geospatial-element-child-indexes>
+ <element-word-lexicons>
+<!--
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+-->
+ </element-word-lexicons>
+ <element-attribute-word-lexicons>
+<!--
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>sample-element</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+-->
+ </element-attribute-word-lexicons>
</database>
<!--Create Application Modules Database-->
<database>
View
549 deploy/test/data/ml4-config.xml
@@ -0,0 +1,549 @@
+<configuration>
+ <task-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <threads>16</threads>
+ <debug-threads>16</debug-threads>
+ <max-time-limit>3600</max-time-limit>
+ <default-time-limit>600</default-time-limit>
+ <queue-size>100000</queue-size>
+ <pre-commit-trigger-depth>1000</pre-commit-trigger-depth>
+ <post-commit-trigger-depth>1000</post-commit-trigger-depth>
+ <pre-commit-trigger-limit>10000</pre-commit-trigger-limit>
+ <log-errors>true</log-errors>
+ <debug-allow>true</debug-allow>
+ <profile-allow>true</profile-allow>
+ <scheduled-tasks/>
+ </task-server>
+ <http-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <!--Default Application Server-->
+ <http-server>
+ <http-server-name>@ml.app-name</http-server-name>
+ <port>@ml.app-port</port>
+ <database name="@ml.content-db"/>
+ <modules name="@ml.app-modules-db"/>
+ <root>@ml.modules-root</root>
+ <authentication>@ml.authentication-method</authentication>
+ <default-user name="@ml.default-user"/>
+ <url-rewriter>@ml.url-rewriter</url-rewriter>
+ <error-handler>@ml.error-handler</error-handler>
+ </http-server>
+ @ml.test-appserver
+ </http-servers>
+ <xdbc-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ @ml.xdbc-server
+ </xdbc-servers>
+ <!--Assignments-->
+ <assignments xmlns="http://marklogic.com/xdmp/assignments" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/assignments assignments.xsd">
+ <assignment>
+ <forest-name>@ml.content-db</forest-name>
+ </assignment>
+ @ml.test-content-db-assignment
+ @ml.test-modules-db-assignment
+ <assignment>
+ <forest-name>@ml.modules-db</forest-name>
+ </assignment>
+ @ml.schemas-assignment
+ @ml.triggers-assignment
+ </assignments>
+ <!--
+ =========================================================
+ Databases that are created as part of the application
+ Add any database configuration or indexes here
+ =========================================================
+ -->
+ <databases xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/database database.xsd">
+ <!--Application Database Configuration-->
+ @ml.test-content-db-xml
+ <database>
+ <database-name>@ml.content-db</database-name>
+ <forests-per-host>@ml.content-forests-per-host</forests-per-host>
+ @ml.schemas-mapping
+ @ml.triggers-mapping
+ <forests>
+ <forest-id name="@ml.content-db"/>
+ </forests>
+ <uri-lexicon>true</uri-lexicon>
+ <collection-lexicon>true</collection-lexicon>
+ <directory-creation>manual</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ <fragment-roots>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-root</localname>
+ </fragment-root>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>frag-root2</localname>
+ </fragment-root>
+ </fragment-roots>
+ <fragment-parents>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents</localname>
+ </fragment-parent>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents2</localname>
+ </fragment-parent>
+ </fragment-parents>
+ <fields>
+ <field>
+ <field-name/>
+ <include-root>false</include-root>
+ <word-lexicons>
+ <word-lexicon>http://marklogic.com/collation/</word-lexicon>
+ <word-lexicon>http://marklogic.com/collation/it/S2/CU/T00BB/AS</word-lexicon>
+ </word-lexicons>
+ <stemmed-searches>decompounding</stemmed-searches>
+ <word-searches>true</word-searches>
+ <fast-phrase-searches>true</fast-phrase-searches>
+ <fast-case-sensitive-searches>true</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
+ <trailing-wildcard-searches>true</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>true</trailing-wildcard-word-positions>
+ <three-character-searches>true</three-character-searches>
+ <three-character-word-positions>true</three-character-word-positions>
+ <two-character-searches>true</two-character-searches>
+ <one-character-searches>true</one-character-searches>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-include</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-include2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-exclude</localname>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-exclude2</localname>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+
+ <field>
+ <field-name>test</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ <field>
+ <field-name>test2</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ </fields>
+ <range-element-indexes>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample2</namespace-uri>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ </range-element-indexes>
+ <range-element-attribute-indexes>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>person</parent-localname>
+ <namespace-uri/>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>person2</parent-localname>
+ <namespace-uri/>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ </range-element-attribute-indexes>
+ <range-field-indexes>
+ </range-field-indexes>
+ <path-namespaces>
+ </path-namespaces>
+ <range-path-indexes>
+ </range-path-indexes>
+ <geospatial-element-indexes>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-index>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-index>
+ </geospatial-element-indexes>
+ <geospatial-element-attribute-pair-indexes>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ </geospatial-element-attribute-pair-indexes>
+ <geospatial-element-pair-indexes>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ </geospatial-element-pair-indexes>
+ <geospatial-element-child-indexes>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ </geospatial-element-child-indexes>
+ <element-word-lexicons>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ </element-word-lexicons>
+ <element-attribute-word-lexicons>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>sample-element</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>sample-element2</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ </element-attribute-word-lexicons>
+ </database>
+ <!--Create Application Modules Database-->
+ <database>
+ <database-name>@ml.modules-db</database-name>
+ <forests>
+ <forest-id name="@ml.modules-db"/>
+ </forests>
+ <stemmed-searches>off</stemmed-searches>
+ <word-searches>false</word-searches>
+ <word-positions>false</word-positions>
+ <fast-phrase-searches>false</fast-phrase-searches>
+ <fast-reverse-searches>false</fast-reverse-searches>
+ <fast-case-sensitive-searches>false</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>false</fast-diacritic-sensitive-searches>
+ <fast-element-word-searches>false</fast-element-word-searches>
+ <element-word-positions>false</element-word-positions>
+ <fast-element-phrase-searches>false</fast-element-phrase-searches>
+ <element-value-positions>false</element-value-positions>
+ <attribute-value-positions>false</attribute-value-positions>
+ <three-character-searches>false</three-character-searches>
+ <three-character-word-positions>false</three-character-word-positions>
+ <fast-element-character-searches>false</fast-element-character-searches>
+ <trailing-wildcard-searches>false</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>false</trailing-wildcard-word-positions>
+ <fast-element-trailing-wildcard-searches>false</fast-element-trailing-wildcard-searches>
+ <word-lexicons/>
+ <two-character-searches>false</two-character-searches>
+ <one-character-searches>false</one-character-searches>
+ <uri-lexicon>false</uri-lexicon>
+ <collection-lexicon>false</collection-lexicon>
+ <directory-creation>automatic</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ </database>
+ <!--Create Test Modules Database-->
+ @ml.test-modules-db-xml
+ <!--Create a Triggers Database-->
+ @ml.triggers-db-xml
+ @ml.schemas-db-xml
+ </databases>
+ <roles xmlns="http://marklogic.com/xdmp/security">
+ <role>
+ <role-name>@ml.app-role</role-name>
+ <description>A role for users of the @ml.app-name application</description>
+ <role-names>
+ </role-names>
+ <permissions>
+ <permission>
+ <capability>execute</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>update</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>insert</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>read</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ </permissions>
+ <collections>
+ </collections>
+ <privileges>
+ <privilege>
+ <privilege-name>xdmp:value</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:add-response-header</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:invoke</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:with-namespaces</privilege-name>
+ </privilege>
+ </privileges>
+ </role>
+ <role>
+ <role-name>@ml.app-role2</role-name>
+ <description>A second role for users of the @ml.app-name application</description>
+ <role-names>
+ </role-names>
+ <permissions>
+ <permission>
+ <capability>execute</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>update</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>insert</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>read</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ </permissions>
+ <collections>
+ </collections>
+ <privileges>
+ <privilege>
+ <privilege-name>xdmp:value</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:add-response-header</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:invoke</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:with-namespaces</privilege-name>
+ </privilege>
+ </privileges>
+ </role>
+ </roles>
+ <users xmlns="http://marklogic.com/xdmp/security">
+ <user>
+ <user-name>@ml.app-name-user</user-name>
+ <description>A user for the @ml.app-name application</description>
+ <password>password</password>
+ <role-names>
+ <role-names>@ml.app-role</role-names>
+ </role-names>
+ <permissions/>
+ <collections/>
+ </user>
+ <user>
+ <user-name>@ml.app-name-user2</user-name>
+ <description>A second user for the @ml.app-name application</description>
+ <password>password2</password>
+ <role-names>
+ <role-names>@ml.app-role2</role-names>
+ </role-names>
+ <permissions/>
+ <collections/>
+ </user>
+ </users>
+ <amps xmlns="http://marklogic.com/xdmp/security">
+ <amp>
+ <namespace>http://marklogic.com/roxy</namespace>
+ <local-name>sample</local-name>
+ <doc-uri>/app/models/sample.xqy</doc-uri>
+ <db-name>@ml.app-modules-db</db-name>
+ <role-name>admin</role-name>
+ </amp>
+ <amp>
+ <namespace>http://marklogic.com/roxy</namespace>
+ <local-name>sample2</local-name>
+ <doc-uri>/app/models/sample2.xqy</doc-uri>
+ <db-name>@ml.app-modules-db</db-name>
+ <role-name>admin</role-name>
+ </amp>
+ </amps>
+ <privileges xmlns="http://marklogic.com/xdmp/security">
+ <privilege>
+ <privilege-name>my-action</privilege-name>
+ <action>http://marklogic.com/custom/privilege/my-action</action>
+ <kind>execute</kind>
+ </privilege>
+ <privilege>
+ <privilege-name>my-action2</privilege-name>
+ <action>http://marklogic.com/custom/privilege/my-action2</action>
+ <kind>execute</kind>
+ </privilege>
+ </privileges>
+ <mimetypes xmlns="http://marklogic.com/xdmp/mimetypes">
+ <mimetype>
+ <name>application/crazy</name>
+ <extension>crazy stuff</extension>
+ <format>text</format>
+ </mimetype>
+ <mimetype>
+ <name>application/crazy2</name>
+ <extension>crazy stuff 2</extension>
+ <format>text</format>
+ </mimetype>
+ </mimetypes>
+</configuration>
View
80 deploy/test/data/ml4-properties/build.properties
@@ -0,0 +1,80 @@
+#################################################################
+# This file contains overrides to values in default.properties
+# Make changes here, not in default.properties
+#################################################################
+
+#
+# Admin username/password that will exist on the dev/cert/prod servers
+#
+user=admin
+password=admin
+
+# Your Application's name
+app-name=roxy-deployer-tester
+
+# The root of you modules database or filesystem dir
+modules-root=/
+
+#
+# the location of your marklogic configuration file
+#
+config.file=${basedir}/deploy/test/data/ml4-config.xml
+
+#
+# Unit Testing
+# Leave commented out for no unit testing
+# turn these on if you are using the roxy unit tester
+#
+test-content-db=${app-name}-content-test
+test-modules-db=${app-name}-modules-test
+test-port=8902
+
+#
+# Leave commented out for default
+#
+schemas-db=${app-name}-schemas
+
+#
+# Leave commented out for default
+# turn it on if you are using triggers or CPF
+#
+triggers-db=${app-name}-triggers
+
+#
+# the port that the Docs appserver is running on
+# Docs appserver is required for boostrapping
+# set this to 8000 for ML 4.x and 8002 for ML 5.x
+# you should only override this if your Docs appserver
+# is running on a funky port
+#
+# bootstrap-port=
+
+#
+# The ports used by your application
+#
+app-port=8900
+xcc-port=8901
+
+content-forests-per-host=2
+
+#
+# The authentication method used for your appserver
+# application-level, basic, digest, digestbasic
+#
+authentication-method=digest
+
+#
+# The user used as the default user in application level authentication.
+# Using the admin user as the default user is equivalent to turning security off.
+#
+# default-user=${app-name}-user
+
+#
+# the uris or IP addresses of your servers
+# WARNING: if you are running these scripts on WINDOWS you may need to change localhost to 127.0.0.1
+# There have been reported issues with dns resolution when localhost wasn't in the hosts file.
+#
+local-server=localhost
+#dev-server=
+#cert-server=
+#prod-server=
View
118 deploy/test/data/ml4-properties/default.properties
@@ -0,0 +1,118 @@
+#################################################################
+# This file contains default application configuration options
+# Don't mess with this file. Instead, copy it to build.properties
+# and mess with that
+#################################################################
+
+#
+# the location of your code to load into ML
+#
+xquery.dir=${basedir}/src
+
+#
+# the location of your unit test code
+#
+xquery-test.dir=${basedir}/src/test
+
+#
+# the location of your xml data to load into ML
+#
+data.dir=${basedir}/data
+
+#
+# the location of your marklogic configuration file
+#
+config.file=${basedir}/deploy/ml-config.xml
+
+#
+# Admin username/password that will exist on the dev/cert/prod servers
+#
+user=admin
+password=admin
+
+#
+# Your Application's name
+#
+app-name=roxy
+modules-root=/
+
+# The role that is given permissions and execute privileges
+app-role=${app-name}-role
+
+#
+# The names of your databases. Forests are given the same names
+#
+app-modules-db=${app-name}-modules
+content-db=${app-name}-content
+modules-db=${app-name}-modules
+
+#
+# Number of forests to create per host in the group for the content-db
+#
+content-forests-per-host=1
+
+#
+# A location on disk to store the forest data. "data directory" in the admin ui
+#
+# forest-data-dir=
+
+# Leave commented out for no test db
+# turn it on if you are using the roxy unit tester
+# test-content-db=${app-name}-content-test
+# test-modules-db=${app-modules-db}
+
+# Leave commented out for default
+# schemas-db=${app-name}-schemas
+
+# Leave commented out for default
+# turn it on if you are using triggers or CPF
+# triggers-db=${app-name}-triggers
+
+#
+# the port that the Docs appserver is running on
+# Docs appserver is required for boostrapping
+#
+bootstrap-port-five=8002
+bootstrap-port-four=8000
+
+#
+# The ports used by your application
+#
+app-port=8040
+xcc-port=8041
+
+# Leave commented out for no test appserver
+# turn it on if you are using the roxy unit tester
+# test-port=8042
+
+#
+# The authentication used for your appserver
+#
+authentication-method=digest
+default-user=${app-name}-user
+
+#
+# The default values point to Roxy file
+#
+url-rewriter=/roxy/rewrite.xqy
+error-handler=/roxy/error.xqy
+
+environments=local,dev,prod
+
+#
+# The Major version of ML server across your environments (4 or 5). You can override
+# this value in build.properties if all of your servers are the same version
+# or override it in each ${env}.properties file if each server has a different
+# version.
+#
+server-version=5
+
+#
+# the uris or IP addresses of your servers
+# WARNING: if you are running these scripts on windows you may need to change localhost to 127.0.0.1
+# There have been reported issues with dns resolution when localhost wasn't in the hosts file.
+#
+local-server=localhost
+#dev-server=
+#cert-server=
+#prod-server=
View
569 deploy/test/data/ml5-config.xml
@@ -0,0 +1,569 @@
+<configuration>
+ <task-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <threads>16</threads>
+ <debug-threads>16</debug-threads>
+ <max-time-limit>3600</max-time-limit>
+ <default-time-limit>600</default-time-limit>
+ <queue-size>100000</queue-size>
+ <pre-commit-trigger-depth>1000</pre-commit-trigger-depth>
+ <post-commit-trigger-depth>1000</post-commit-trigger-depth>
+ <pre-commit-trigger-limit>10000</pre-commit-trigger-limit>
+ <log-errors>true</log-errors>
+ <debug-allow>true</debug-allow>
+ <profile-allow>true</profile-allow>
+ <scheduled-tasks/>
+ </task-server>
+ <http-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <!--Default Application Server-->
+ <http-server>
+ <http-server-name>@ml.app-name</http-server-name>
+ <port>@ml.app-port</port>
+ <database name="@ml.content-db"/>
+ <modules name="@ml.app-modules-db"/>
+ <root>@ml.modules-root</root>
+ <authentication>@ml.authentication-method</authentication>
+ <default-user name="@ml.default-user"/>
+ <url-rewriter>@ml.url-rewriter</url-rewriter>
+ <error-handler>@ml.error-handler</error-handler>
+ </http-server>
+ @ml.test-appserver
+ </http-servers>
+ <xdbc-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ @ml.xdbc-server
+ </xdbc-servers>
+ <!--Assignments-->
+ <assignments xmlns="http://marklogic.com/xdmp/assignments" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/assignments assignments.xsd">
+ <assignment>
+ <forest-name>@ml.content-db</forest-name>
+ </assignment>
+ @ml.test-content-db-assignment
+ @ml.test-modules-db-assignment
+ <assignment>
+ <forest-name>@ml.modules-db</forest-name>
+ </assignment>
+ @ml.schemas-assignment
+ @ml.triggers-assignment
+ </assignments>
+ <!--
+ =========================================================
+ Databases that are created as part of the application
+ Add any database configuration or indexes here
+ =========================================================
+ -->
+ <databases xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/database database.xsd">
+ <!--Application Database Configuration-->
+ @ml.test-content-db-xml
+ <database>
+ <database-name>@ml.content-db</database-name>
+ <forests-per-host>@ml.content-forests-per-host</forests-per-host>
+ @ml.schemas-mapping
+ @ml.triggers-mapping
+ <forests>
+ <forest-id name="@ml.content-db"/>
+ </forests>
+ <uri-lexicon>true</uri-lexicon>
+ <collection-lexicon>true</collection-lexicon>
+ <directory-creation>manual</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ <fragment-roots>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-root</localname>
+ </fragment-root>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>frag-root2</localname>
+ </fragment-root>
+ </fragment-roots>
+ <fragment-parents>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents</localname>
+ </fragment-parent>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents2</localname>
+ </fragment-parent>
+ </fragment-parents>
+ <fields>
+ <field>
+ <field-name/>
+ <include-root>false</include-root>
+ <word-lexicons>
+ <word-lexicon>http://marklogic.com/collation/</word-lexicon>
+ <word-lexicon>http://marklogic.com/collation/it/S2/CU/T00BB/AS</word-lexicon>
+ </word-lexicons>
+ <stemmed-searches>decompounding</stemmed-searches>
+ <word-searches>true</word-searches>
+ <fast-phrase-searches>true</fast-phrase-searches>
+ <fast-case-sensitive-searches>true</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
+ <trailing-wildcard-searches>true</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>true</trailing-wildcard-word-positions>
+ <three-character-searches>true</three-character-searches>
+ <three-character-word-positions>true</three-character-word-positions>
+ <two-character-searches>true</two-character-searches>
+ <one-character-searches>true</one-character-searches>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-include</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-include2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-exclude</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-exclude2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+
+ <field>
+ <field-name>test</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ <field>
+ <field-name>test2</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ </fields>
+ <range-element-indexes>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample2</namespace-uri>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ </range-element-indexes>
+ <range-element-attribute-indexes>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>person</parent-localname>
+ <namespace-uri/>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>person2</parent-localname>
+ <namespace-uri/>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ </range-element-attribute-indexes>
+ <range-field-indexes>
+ <range-field-index>
+ <scalar-type>date</scalar-type>
+ <field-name>sample</field-name>
+ <collation/>
+ <range-value-positions>false</range-value-positions>
+ </range-field-index>
+ <range-field-index>
+ <scalar-type>date</scalar-type>
+ <field-name>sample2</field-name>
+ <collation/>
+ <range-value-positions>false</range-value-positions>
+ </range-field-index>
+ </range-field-indexes>
+ <path-namespaces>
+ </path-namespaces>
+ <range-path-indexes>
+ </range-path-indexes>
+ <geospatial-element-indexes>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </geospatial-element-index>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </geospatial-element-index>
+ </geospatial-element-indexes>
+ <geospatial-element-attribute-pair-indexes>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ </geospatial-element-attribute-pair-indexes>
+ <geospatial-element-pair-indexes>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ </geospatial-element-pair-indexes>
+ <geospatial-element-child-indexes>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ </geospatial-element-child-indexes>
+ <element-word-lexicons>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ </element-word-lexicons>
+ <element-attribute-word-lexicons>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>sample-element</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>sample-element2</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ </element-attribute-word-lexicons>
+ </database>
+ <!--Create Application Modules Database-->
+ <database>
+ <database-name>@ml.modules-db</database-name>
+ <forests>
+ <forest-id name="@ml.modules-db"/>
+ </forests>
+ <stemmed-searches>off</stemmed-searches>
+ <word-searches>false</word-searches>
+ <word-positions>false</word-positions>
+ <fast-phrase-searches>false</fast-phrase-searches>
+ <fast-reverse-searches>false</fast-reverse-searches>
+ <fast-case-sensitive-searches>false</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>false</fast-diacritic-sensitive-searches>
+ <fast-element-word-searches>false</fast-element-word-searches>
+ <element-word-positions>false</element-word-positions>
+ <fast-element-phrase-searches>false</fast-element-phrase-searches>
+ <element-value-positions>false</element-value-positions>
+ <attribute-value-positions>false</attribute-value-positions>
+ <three-character-searches>false</three-character-searches>
+ <three-character-word-positions>false</three-character-word-positions>
+ <fast-element-character-searches>false</fast-element-character-searches>
+ <trailing-wildcard-searches>false</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>false</trailing-wildcard-word-positions>
+ <fast-element-trailing-wildcard-searches>false</fast-element-trailing-wildcard-searches>
+ <word-lexicons/>
+ <two-character-searches>false</two-character-searches>
+ <one-character-searches>false</one-character-searches>
+ <uri-lexicon>false</uri-lexicon>
+ <collection-lexicon>false</collection-lexicon>
+ <directory-creation>automatic</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ </database>
+ <!--Create Test Modules Database-->
+ @ml.test-modules-db-xml
+ <!--Create a Triggers Database-->
+ @ml.triggers-db-xml
+ @ml.schemas-db-xml
+ </databases>
+ <roles xmlns="http://marklogic.com/xdmp/security">
+ <role>
+ <role-name>@ml.app-role</role-name>
+ <description>A role for users of the @ml.app-name application</description>
+ <role-names>
+ </role-names>
+ <permissions>
+ <permission>
+ <capability>execute</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>update</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>insert</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ <permission>
+ <capability>read</capability>
+ <role-name>@ml.app-role</role-name>
+ </permission>
+ </permissions>
+ <collections>
+ </collections>
+ <privileges>
+ <privilege>
+ <privilege-name>xdmp:value</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:add-response-header</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:invoke</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:with-namespaces</privilege-name>
+ </privilege>
+ </privileges>
+ </role>
+ <role>
+ <role-name>@ml.app-role2</role-name>
+ <description>A second role for users of the @ml.app-name application</description>
+ <role-names>
+ </role-names>
+ <permissions>
+ <permission>
+ <capability>execute</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>update</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>insert</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ <permission>
+ <capability>read</capability>
+ <role-name>@ml.app-role2</role-name>
+ </permission>
+ </permissions>
+ <collections>
+ </collections>
+ <privileges>
+ <privilege>
+ <privilege-name>xdmp:value</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:add-response-header</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:invoke</privilege-name>
+ </privilege>
+ <privilege>
+ <privilege-name>xdmp:with-namespaces</privilege-name>
+ </privilege>
+ </privileges>
+ </role>
+ </roles>
+ <users xmlns="http://marklogic.com/xdmp/security">
+ <user>
+ <user-name>@ml.app-name-user</user-name>
+ <description>A user for the @ml.app-name application</description>
+ <password>password</password>
+ <role-names>
+ <role-names>@ml.app-role</role-names>
+ </role-names>
+ <permissions/>
+ <collections/>
+ </user>
+ <user>
+ <user-name>@ml.app-name-user2</user-name>
+ <description>A second user for the @ml.app-name application</description>
+ <password>password2</password>
+ <role-names>
+ <role-names>@ml.app-role2</role-names>
+ </role-names>
+ <permissions/>
+ <collections/>
+ </user>
+ </users>
+ <amps xmlns="http://marklogic.com/xdmp/security">
+ <amp>
+ <namespace>http://marklogic.com/roxy</namespace>
+ <local-name>sample</local-name>
+ <doc-uri>/app/models/sample.xqy</doc-uri>
+ <db-name>@ml.app-modules-db</db-name>
+ <role-name>admin</role-name>
+ </amp>
+ <amp>
+ <namespace>http://marklogic.com/roxy</namespace>
+ <local-name>sample2</local-name>
+ <doc-uri>/app/models/sample2.xqy</doc-uri>
+ <db-name>@ml.app-modules-db</db-name>
+ <role-name>admin</role-name>
+ </amp>
+ </amps>
+ <privileges xmlns="http://marklogic.com/xdmp/security">
+ <privilege>
+ <privilege-name>my-action</privilege-name>
+ <action>http://marklogic.com/custom/privilege/my-action</action>
+ <kind>execute</kind>
+ </privilege>
+ <privilege>
+ <privilege-name>my-action2</privilege-name>
+ <action>http://marklogic.com/custom/privilege/my-action2</action>
+ <kind>execute</kind>
+ </privilege>
+ </privileges>
+ <mimetypes xmlns="http://marklogic.com/xdmp/mimetypes">
+ <mimetype>
+ <name>application/crazy</name>
+ <extension>crazy stuff</extension>
+ <format>text</format>
+ </mimetype>
+ <mimetype>
+ <name>application/crazy2</name>
+ <extension>crazy stuff 2</extension>
+ <format>text</format>
+ </mimetype>
+ </mimetypes>
+</configuration>
View
591 deploy/test/data/ml6-config.xml
@@ -0,0 +1,591 @@
+<configuration>
+ <task-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <threads>16</threads>
+ <debug-threads>16</debug-threads>
+ <max-time-limit>3600</max-time-limit>
+ <default-time-limit>600</default-time-limit>
+ <queue-size>100000</queue-size>
+ <pre-commit-trigger-depth>1000</pre-commit-trigger-depth>
+ <post-commit-trigger-depth>1000</post-commit-trigger-depth>
+ <pre-commit-trigger-limit>10000</pre-commit-trigger-limit>
+ <log-errors>true</log-errors>
+ <debug-allow>true</debug-allow>
+ <profile-allow>true</profile-allow>
+ <scheduled-tasks/>
+ </task-server>
+ <http-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ <!--Default Application Server-->
+ <http-server>
+ <http-server-name>@ml.app-name</http-server-name>
+ <port>@ml.app-port</port>
+ <database name="@ml.content-db"/>
+ <modules name="@ml.app-modules-db"/>
+ <root>@ml.modules-root</root>
+ <authentication>@ml.authentication-method</authentication>
+ <default-user name="@ml.default-user"/>
+ <url-rewriter>@ml.url-rewriter</url-rewriter>
+ <error-handler>@ml.error-handler</error-handler>
+ </http-server>
+ @ml.test-appserver
+ </http-servers>
+ <xdbc-servers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://marklogic.com/xdmp/group" xsi:schemaLocation="http://marklogic.com/xdmp/group group.xsd">
+ @ml.xdbc-server
+ </xdbc-servers>
+ <!--Assignments-->
+ <assignments xmlns="http://marklogic.com/xdmp/assignments" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/assignments assignments.xsd">
+ <assignment>
+ <forest-name>@ml.content-db</forest-name>
+ </assignment>
+ @ml.test-content-db-assignment
+ @ml.test-modules-db-assignment
+ <assignment>
+ <forest-name>@ml.modules-db</forest-name>
+ </assignment>
+ @ml.schemas-assignment
+ @ml.triggers-assignment
+ </assignments>
+ <!--
+ =========================================================
+ Databases that are created as part of the application
+ Add any database configuration or indexes here
+ =========================================================
+ -->
+ <databases xmlns="http://marklogic.com/xdmp/database" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://marklogic.com/xdmp/database database.xsd">
+ <!--Application Database Configuration-->
+ @ml.test-content-db-xml
+ <database>
+ <database-name>@ml.content-db</database-name>
+ <forests-per-host>@ml.content-forests-per-host</forests-per-host>
+ @ml.schemas-mapping
+ @ml.triggers-mapping
+ <forests>
+ <forest-id name="@ml.content-db"/>
+ </forests>
+ <uri-lexicon>true</uri-lexicon>
+ <collection-lexicon>true</collection-lexicon>
+ <directory-creation>manual</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ <fragment-roots>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-root</localname>
+ </fragment-root>
+ <fragment-root>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>frag-root2</localname>
+ </fragment-root>
+ </fragment-roots>
+ <fragment-parents>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents</localname>
+ </fragment-parent>
+ <fragment-parent>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>frag-parents2</localname>
+ </fragment-parent>
+ </fragment-parents>
+ <fields>
+ <field>
+ <field-name/>
+ <include-root>false</include-root>
+ <word-lexicons>
+ <word-lexicon>http://marklogic.com/collation/</word-lexicon>
+ <word-lexicon>http://marklogic.com/collation/it/S2/CU/T00BB/AS</word-lexicon>
+ </word-lexicons>
+ <stemmed-searches>decompounding</stemmed-searches>
+ <word-searches>true</word-searches>
+ <fast-phrase-searches>true</fast-phrase-searches>
+ <fast-case-sensitive-searches>true</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>true</fast-diacritic-sensitive-searches>
+ <trailing-wildcard-searches>true</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>true</trailing-wildcard-word-positions>
+ <three-character-searches>true</three-character-searches>
+ <three-character-word-positions>true</three-character-word-positions>
+ <two-character-searches>true</two-character-searches>
+ <one-character-searches>true</one-character-searches>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-include</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-include2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>word-query-exclude</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>word-query-exclude2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+
+ <field>
+ <field-name>test</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ <field>
+ <field-name>test2</field-name>
+ <include-root>true</include-root>
+ <word-lexicons/>
+ <included-elements>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-included-element</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ <included-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-included-element2</localname>
+ <weight>1.0</weight>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </included-element>
+ </included-elements>
+ <excluded-elements>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-excluded-element</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ <excluded-element>
+ <namespace-uri>http://www.marklogic.com/ns/sample2</namespace-uri>
+ <localname>sample-excluded-element2</localname>
+ <attribute-namespace-uri/>
+ <attribute-localname/>
+ <attribute-value/>
+ </excluded-element>
+ </excluded-elements>
+ </field>
+ </fields>
+ <range-element-indexes>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ <range-element-index>
+ <scalar-type>string</scalar-type>
+ <namespace-uri>http://marklogic.com/ns/sample2</namespace-uri>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-index>
+ </range-element-indexes>
+ <range-element-attribute-indexes>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>person</parent-localname>
+ <namespace-uri/>
+ <localname>name</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ <range-element-attribute-index>
+ <scalar-type>string</scalar-type>
+ <parent-namespace-uri>http://marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>person2</parent-localname>
+ <namespace-uri/>
+ <localname>name2</localname>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <range-value-positions>false</range-value-positions>
+ </range-element-attribute-index>
+ </range-element-attribute-indexes>
+ <range-field-indexes>
+ <range-field-index>
+ <scalar-type>date</scalar-type>
+ <field-name>sample</field-name>
+ <collation/>
+ <range-value-positions>false</range-value-positions>
+ </range-field-index>
+ <range-field-index>
+ <scalar-type>date</scalar-type>
+ <field-name>sample2</field-name>
+ <collation/>
+ <range-value-positions>false</range-value-positions>
+ </range-field-index>
+ </range-field-indexes>
+ <path-namespaces>
+ <path-namespace>
+ <prefix>sample</prefix>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ </path-namespace>
+ <path-namespace>
+ <prefix>sample2</prefix>
+ <namespace-uri>http://marklogic.com/ns/sample2</namespace-uri>
+ </path-namespace>
+ </path-namespaces>
+ <range-path-indexes>
+ <range-path-index>
+ <scalar-type>string</scalar-type>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <path-expression>/sample:root/sample:child</path-expression>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </range-path-index>
+ <range-path-index>
+ <scalar-type>string</scalar-type>
+ <collation>http://marklogic.com/collation/codepoint</collation>
+ <path-expression>/sample:root/sample:child2</path-expression>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </range-path-index>
+ </range-path-indexes>
+ <geospatial-element-indexes>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </geospatial-element-index>
+ <geospatial-element-index>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>geo-element2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ <invalid-values>reject</invalid-values>
+ </geospatial-element-index>
+ </geospatial-element-indexes>
+ <geospatial-element-attribute-pair-indexes>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ <geospatial-element-attribute-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri/>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri/>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-attribute-pair-index>
+ </geospatial-element-attribute-pair-indexes>
+ <geospatial-element-pair-indexes>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ <geospatial-element-pair-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <latitude-namespace-uri>http://marklogic.com/ns/sample</latitude-namespace-uri>
+ <latitude-localname>lat2</latitude-localname>
+ <longitude-namespace-uri>http://marklogic.com/ns/sample</longitude-namespace-uri>
+ <longitude-localname>lon2</longitude-localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <range-value-positions>true</range-value-positions>
+ </geospatial-element-pair-index>
+ </geospatial-element-pair-indexes>
+ <geospatial-element-child-indexes>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ <geospatial-element-child-index>
+ <parent-namespace-uri>http://marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>geo2</parent-localname>
+ <namespace-uri>http://marklogic.com/ns/sample</namespace-uri>
+ <localname>pos2</localname>
+ <coordinate-system>wgs84</coordinate-system>
+ <point-format>point</point-format>
+ <range-value-positions>false</range-value-positions>
+ </geospatial-element-child-index>
+ </geospatial-element-child-indexes>
+ <element-word-lexicons>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ <element-word-lexicon>
+ <namespace-uri>http://www.marklogic.com/ns/sample</namespace-uri>
+ <localname>sample-element2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-word-lexicon>
+ </element-word-lexicons>
+ <element-attribute-word-lexicons>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample</parent-namespace-uri>
+ <parent-localname>sample-element</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ <element-attribute-word-lexicon>
+ <parent-namespace-uri>http://www.marklogic.com/ns/sample2</parent-namespace-uri>
+ <parent-localname>sample-element2</parent-localname>
+ <namespace-uri/>
+ <localname>sample-attribute2</localname>
+ <collation>http://marklogic.com/collation/</collation>
+ </element-attribute-word-lexicon>
+ </element-attribute-word-lexicons>
+ </database>
+ <!--Create Application Modules Database-->
+ <database>
+ <database-name>@ml.modules-db</database-name>
+ <forests>
+ <forest-id name="@ml.modules-db"/>
+ </forests>
+ <stemmed-searches>off</stemmed-searches>
+ <word-searches>false</word-searches>
+ <word-positions>false</word-positions>
+ <fast-phrase-searches>false</fast-phrase-searches>
+ <fast-reverse-searches>false</fast-reverse-searches>
+ <fast-case-sensitive-searches>false</fast-case-sensitive-searches>
+ <fast-diacritic-sensitive-searches>false</fast-diacritic-sensitive-searches>
+ <fast-element-word-searches>false</fast-element-word-searches>
+ <element-word-positions>false</element-word-positions>
+ <fast-element-phrase-searches>false</fast-element-phrase-searches>
+ <element-value-positions>false</element-value-positions>
+ <attribute-value-positions>false</attribute-value-positions>
+ <three-character-searches>false</three-character-searches>
+ <three-character-word-positions>false</three-character-word-positions>
+ <fast-element-character-searches>false</fast-element-character-searches>
+ <trailing-wildcard-searches>false</trailing-wildcard-searches>
+ <trailing-wildcard-word-positions>false</trailing-wildcard-word-positions>
+ <fast-element-trailing-wildcard-searches>false</fast-element-trailing-wildcard-searches>
+ <word-lexicons/>
+ <two-character-searches>false</two-character-searches>
+ <one-character-searches>false</one-character-searches>
+ <uri-lexicon>false</uri-lexicon>
+ <collection-lexicon>false</collection-lexicon>
+ <directory-creation>automatic</directory-creation>
+ <maintain-last-modified>false</maintain-last-modified>
+ </database>
+ <!--Create Test Modules Database-->
+ @ml.test-modules-db-xml
+ <!--Create a Triggers Database-->
+ @ml.triggers-db-xml
+ @ml.schemas-db-xml
+ </databases>