Overview#
DirXML Script
available namespace definitions #
Java extension functions are accessed via a XML namespace prefix mapped to a URI of the form: http://www.novell.com/nxsl/java/<fully-qualified-class-name>.
This URI, is an XML attribute (xmlns) of the DirXML Script Policy Element
- Any namespaces that are explicitly declared on <policy> using xmns:prefix.
- The following implicitly defined namespaces (unless the same prefix has been explicitly defined):
- xmlns:js="http://www.novell.com/nxsl/ecmascript"
- xmlns:es="http://www.novell.com/nxsl/ecmascript"
- xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor"
- xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor"
- xmlns:jdbc="urn:dirxml:jdbc"
- Any namespace prefix that is not otherwise mapped will be automatically mapped to http://www.novell.com/nxsl/java/<prefix> if and only if prefix is a fully qualified Java class name that can be resolved to an available Java class via introspection.
Example of an added namespace definition #
The added namespace "uvf" shown below allows calls to the UniqueValueFinder class within the com.willeke.util.uniqueName package.<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE policy PUBLIC "policy-builder-dtd" "C:\Program Files\Novell\Designer\plugins\com.novell.idm.policybuilder_3.5.0.200909160331\DTD\dirxmlscript3.6.dtd"> <policy xmlns:uvf="http://www.novell.com/nxsl/java/com.willeke.util.uniqueName.UniqueValueFinder"> ... </policy>
The above namespace definition allow the methods within the UniqueValueFinder class to be called using a syntax similar to:
<token-xpath expression='uvf:findUniqueValue("willekeUcode",$lv-ucodePrefix, "null", "6","100000", "true", "true", "dummy")'/>Shows a DirXML Example and XPATH Example for working with DirXML Script namespace definitions.
In this example, we are calling the findUniqueValue method within the package com.willeke.util.uniqueName package and the UniqueValueFinder method.