8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! CDDL HEADER START
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! The contents of this file are subject to the terms of the
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! Common Development and Distribution License, Version 1.0 only
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! (the "License"). You may not use this file except in compliance
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! with the License.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! or http://forgerock.org/license/CDDLv1.0.html.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! See the License for the specific language governing permissions
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! and limitations under the License.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! When distributing Covered Code, include this CDDL HEADER in each
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! file and include the License file at legal-notices/CDDLv1_0.txt.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! If applicable, add the following below this CDDL HEADER, with the
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! fields enclosed by brackets "[]" replaced with your own identifying
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac ! information:
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! Portions Copyright [yyyy] [name of copyright owner]
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift ! CDDL HEADER END
72e934bdd76d612e7d4ee1b76acb57adb6fc851dludovicp ! Copyright 2008-2010 Sun Microsystems, Inc.
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew ! Portions copyright 2011 ForgeRock AS.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift<xsl:stylesheet version="1.0" xmlns:adm="http://www.opends.org/admin"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift xmlns:admpp="http://www.opends.org/admin-preprocessor"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Global parameter: the absolute path of the base directory where
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift XML managed object definitions can be found.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get an absolute URI from a package, object name, and suffix.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Convert the package name to a relative path.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="rpath" select="translate($package, '.', '/')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Convert the managed object name to a file name.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="value" select="$name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get the absolute path.
72e934bdd76d612e7d4ee1b76acb57adb6fc851dludovicp <xsl:variable name="base-file" select="file:new($base-dir)" />
72e934bdd76d612e7d4ee1b76acb57adb6fc851dludovicp <xsl:variable name="base-dir-uri" select="file:toURI($base-file)" />
72e934bdd76d612e7d4ee1b76acb57adb6fc851dludovicp select="concat($base-dir-uri, '/', $rpath, '/', $java-name, $suffix)" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get the URI of the named package definition.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="package" select="$package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="name" select="'package'" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get the URI of the named managed object definition.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="package" select="$package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat($name, '-configuration')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process the current managed object element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template name="pre-process-managed-object">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:if test="not(adm:root-managed-object | adm:managed-object)">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="'No managed object definition found.'" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="adm:root-managed-object | adm:managed-object"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process a managed object definition: pull in the managed object's
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift inherited property definitions and relations.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:managed-object" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="'Managed object definition does not specify managed object name.'" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="'Managed object definition does not specify managed object package.'" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="parent-name" select="@extends" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift The parent package defaults to this managed object's package.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get this managed object's hierarchy if there is one.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:call-template name="get-managed-object-uri">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="package" select="$parent-package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="name" select="$parent-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:if test="not(document($uri)/adm:managed-object)">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('No managed object definition found in ', $uri, '.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="not(document($uri)/adm:managed-object[@name=$parent-name and @package=$parent-package])">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Managed object definition found in ', $uri, ' but it did not define a managed object ', $parent-name, ' in package ', $parent-package, '.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="document($uri)/adm:managed-object"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="hierarchy" select="exsl:node-set($_hierarchy)" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now pre-process this managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Shallow copy this element and its attributes.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process this managed object's elements.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift select="adm:TODO|adm:synopsis|adm:description"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="@name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="@package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Copy all inherited tags plus locally defined tags.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:copy-of select="$hierarchy/adm:managed-object/adm:tag" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:apply-templates select="adm:tag" mode="pre-process">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="moname" select="@name" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="mopackage" select="@package" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
0c45338572f2f6593fea8fc9e70bcb9ef3a6d2f8matthew_swift Copy constraint elements.
0c45338572f2f6593fea8fc9e70bcb9ef3a6d2f8matthew_swift <xsl:apply-templates select="adm:constraint" mode="pre-process">
0c45338572f2f6593fea8fc9e70bcb9ef3a6d2f8matthew_swift <xsl:with-param name="moname" select="@name" />
0c45338572f2f6593fea8fc9e70bcb9ef3a6d2f8matthew_swift <xsl:with-param name="mopackage" select="@package" />
0c45338572f2f6593fea8fc9e70bcb9ef3a6d2f8matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Copy profile elements.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:apply-templates select="adm:profile" mode="pre-process">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="moname" select="@name" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="mopackage" select="@package" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Add a pre-processor element defining this managed object's uppermost
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:element name="admpp:parent-managed-object">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$hierarchy/adm:managed-object/adm:profile[@name='preprocessor']/admpp:parent-managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy all inherited relations.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:copy-of select="$hierarchy/adm:managed-object/adm:relation" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy all local relations.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="adm:relation" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="@name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="@package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy all inherited properties.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="adm:property-override" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="$hierarchy/adm:managed-object/adm:property[not(@name=$property-overrides/@name)]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy all local properties.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="adm:property|adm:property-reference|adm:property-override"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="@name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="@package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process a managed object definition: pull in the managed object's
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift inherited property definitions and relations.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:root-managed-object" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now pre-process this root managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift By definition it has no hierarchy.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Shallow copy this element and its attributes.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process this managed object's elements.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="'root'" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Pre-process a tag and validate it and by adding a "preprocessor"
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift profile which contains information about where the tag was defined.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:template match="adm:tag" mode="pre-process">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Make sure that this tag is not duplicated.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift select="concat('Tag ', @name, ' is already defined in this managed object')" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Make sure that this tag does not override an existing tag.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:if test="$hierarchy/adm:managed-object/adm:tag[@name=$name]">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift select="concat('Tag ', @name, ' is already defined in a parent managed object')" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Get the referenced package.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:call-template name="get-managed-object-uri">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="name" select="'root'" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:if test="not(document($uri)/adm:root-managed-object)">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift select="concat('Root managed object definition not found in ', $uri, '.')" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift test="not(document($uri)/adm:root-managed-object/adm:tag-definition[@name=$name])">
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift select="concat('Tag "', $name,
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift '" not defined in root managed object definition.')" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift Copy the tag.
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="moname" select="$moname" />
408b8eb145348cb8f251a8abfec96e7e4e80f630matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process a property definition by adding a "preprocessor" profile
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift which contains information about where the property was defined.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:property" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this property does not have the same name as another
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift property or reference in this managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="/adm:property[@name=$name][2] |
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift /adm:property-reference[@name=$name]">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Property definition ', @name, ' is already defined in this managed object')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this property does not override an existing property.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="$hierarchy/adm:managed-object/adm:property[@name=$name]">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Property definition ', @name, ' is already defined in a parent managed object')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Shallow copy this element and its attributes.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Apply templates to subordinate elements (e.g. descriptions).
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now append the preprocessor profile.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process a property reference pulling in the referenced property
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift definition and by adding a "preprocessor" profile which contains
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift information about where the property was defined.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:property-reference" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this property reference does not have the same name as another
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift property or reference in this managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="/adm:property[@name=$name] |
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift /adm:property-reference[@name=$name][2]">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Property definition ', @name, ' is already defined in this managed object')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this property does not override an existing property.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="$hierarchy/adm:managed-object/adm:property[@name=$name]">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Property reference ', @name, ' is already defined in a parent managed object')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Determine the package containing the reference property definition.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Get the referenced package.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="package" select="$package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:if test="not(document($uri)/adm:package)">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('No package definition found in ', $uri, '.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:if test="not(document($uri)/adm:package[@name=$package])">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Package definition found in ', $uri, ' but it did not define package ', $package, '.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="not(document($uri)/adm:package[@name=$package]/adm:property[@name=$name])">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Referenced property definition "', $name,
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift '" not found in package definition "', $package,
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift '".')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy the referenced property definition taking care to override
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift the default behavior and admin action if required.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="document($uri)/adm:package[@name=$package]/adm:property[@name=$name]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$property/adm:TODO | $property/adm:synopsis | $property/adm:description"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="adm:requires-admin-action"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$property/adm:requires-admin-action"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="adm:default-behavior"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="$property/adm:default-behavior"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$property/adm:syntax | $property/adm:profile"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now append the preprocessor profile.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift Pre-process a property override pulling in the inherited property
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift definition and by adding a "preprocessor" profile which contains
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift information about where the property was redefined.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:template match="adm:property-override" mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift Make sure that this property override does not have the same name as another
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift property override in this managed object.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:if test="/adm:property-override[@name=$name][2]">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="concat('Property override ', @name, ' is already overridden in this managed object')" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift Make sure that this property overrides an existing property.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift test="not($hierarchy/adm:managed-object/adm:property[@name=$name])">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="concat('Cannot find inherited property ', @name, ' for property override')" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift Copy the inherited property definition taking care to override
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift the default behavior and admin action if required.
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="$hierarchy/adm:managed-object/adm:property[@name=$name]" />
188a85993cf1cf9925338176e5f27b95a5891c50matthew_swift <xsl:copy-of select="$property/@*[local-name() != 'advanced']" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="$property/adm:TODO | $property/adm:synopsis | $property/adm:description"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:apply-templates select="adm:requires-admin-action"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="$property/adm:requires-admin-action"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:apply-templates select="adm:default-behavior"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:apply-templates select="$property/adm:default-behavior"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift select="$property/adm:syntax | $property/adm:profile[@name!='preprocessor']"
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift mode="pre-process">
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="moname" select="$moname" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
91940c5122d22be4fd20bc41db2ffc4a9ba4ce59matthew_swift Now append the preprocessor profile.
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift test="$property/adm:profile[@name='preprocessor']/admpp:first-defined-in">
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$property/adm:profile[@name='preprocessor']/admpp:first-defined-in" />
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$property/adm:profile[@name='preprocessor']/admpp:last-defined-in/@*" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Pre-process a relation, merging information from the referenced
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift managed object where required, and by adding a "preprocessor" profile
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift which contains information about where the relation was defined.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:relation" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Determine the name of the relation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this relation does not override an existing relation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift test="$hierarchy/adm:managed-object/adm:relation[@name=$name]">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Relation ', $name, ' is already defined in a parent managed object.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Make sure that this relation is not already defined in this managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Relation ', $name, ' is already defined in this managed object.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now get the referenced managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="@managed-object-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:when test="not(@managed-object-package)">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="@managed-object-package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:call-template name="get-managed-object-uri">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="name" select="$mname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="package" select="$mpackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="document($uri)/adm:managed-object[@name=$mname]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="concat('Managed object definition "', $mname, '" not found in ', $uri, '.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now merge the relation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Add missing attribute managed-object-name if it is not provided.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Add missing attribute managed-object-package if it is not provided.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy TODO element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy synopsis element from referenced managed object if it is undefined.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="$managed-object/adm:synopsis"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Copy description element from referenced managed object if it is undefined.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:apply-templates select="$managed-object/adm:description"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Merge remaining elements.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="*[not(self::adm:TODO|self::adm:synopsis|self::adm:description)]"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="managed-object" select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Now append the preprocessor profile.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Default template for merging relations.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="*|comment()" mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:param name="managed-object" select="/.." />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="managed-object" select="$managed-object" />
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift Merge a default managed object.
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift <xsl:template match="adm:default-managed-object" mode="merge-relation">
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift <xsl:param name="managed-object" select="/.." />
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift Add missing attribute managed-object-name if it is not provided.
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift <xsl:value-of select="$managed-object/@name" />
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift Add missing attribute managed-object-package if it is not provided.
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift <xsl:value-of select="$managed-object/@package" />
7edb1a6332a5678c67bfa236b629d47cab1525c1matthew_swift <xsl:with-param name="managed-object" select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Merge a one-to-many relation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:one-to-many" mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:param name="managed-object" select="/.." />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift Make sure that if this relation uses a naming property that the
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift naming property exists, is single-valued, mandatory, and read-only.
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="@naming-property" />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift FIXME: this does not cope with the situation where the property
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift is inherited, referenced, or overridden.
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="$managed-object/adm:property[@name=$naming-property-name]" />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="concat('Relation ', ../@name,
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift ' references an unknown naming property ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $naming-property-name, ' in ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $managed-object/@name, '.')" />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift <xsl:if test="not($naming-property/@read-only='true')">
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="concat('Relation ', ../@name,
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift ' references the naming property ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $naming-property-name, ' in ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $managed-object/@name, ' which is not read-only. ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift 'Naming properties must be read-only.')" />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift <xsl:if test="not($naming-property/@mandatory='true')">
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="concat('Relation ', ../@name,
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift ' references the naming property ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $naming-property-name, ' in ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $managed-object/@name, ' which is not mandatory. ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift 'Naming properties must be mandatory.')" />
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift <xsl:if test="$naming-property/@multi-valued='true'">
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift select="concat('Relation ', ../@name,
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift ' references the naming property ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $naming-property-name, ' in ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift $managed-object/@name, ' which is multi-valued. ',
c9020c301eada7085bb81da1821cac5533a1f20fmatthew_swift 'Naming properties must be single-valued.')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Add missing plural name attribute if not present.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="$managed-object/@plural-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="managed-object" select="$managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Process a rich-description element in a relation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:synopsis|adm:description"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="merge-relation">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:param name="managed-object" select="/.." />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Shallow copy.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="value" select="$managed-object/@name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$managed-object/@plural-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Process a rich-description element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift match="adm:synopsis|adm:description|adm:unit-description"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Shallow copy.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="ufn" select="$this-ufn" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="ufpn" select="$this-ufpn" />
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift Process a relative inherited default behavior
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift <xsl:template match="adm:relative" mode="pre-process">
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift Shallow copy.
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift Add missing attribute managed-object-package if it is not provided.
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift Apply templates to subordinate elements.
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift <xsl:with-param name="moname" select="$moname" />
e32b0f1464ea290b749a43d5ee7a6085b14532c9matthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Process a user-friendly-name element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="rich-description">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Process a user-friendly-plural-name element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:user-friendly-plural-name"
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift mode="rich-description">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Process a product-name element.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="adm:product-name" mode="rich-description">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Default template for rich descriptions.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="*|comment()" mode="rich-description">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Default template for pre-processing.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:template match="*|comment()" mode="pre-process">
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="mopackage" select="$mopackage" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="moname" select="$moname" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="hierarchy" select="$hierarchy" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Useful variables relating to the current managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Product name.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift FIXME: should get this from the root configuration but for some
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift reason we get a circular dependency error when constructing
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift the URI in JDK1.6.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="/adm:managed-object/@name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Must be the root configuration.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="/adm:managed-object/@plural-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Must be the root configuration - the plural form should never
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift be required as this is a singleton. We'll define it for
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift <xsl:when test="/adm:managed-object/adm:user-friendly-name">
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift select="normalize-space(/adm:managed-object/adm:user-friendly-name)" />
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift <xsl:with-param name="value" select="$this-name" />
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift test="/adm:managed-object/adm:user-friendly-plural-name">
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift select="normalize-space(/adm:managed-object/adm:user-friendly-plural-name)" />
2e334e4f58d7760ed0788f5db5524d87934d6869matthew_swift <xsl:with-param name="value" select="$this-plural-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:call-template name="pre-process-managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="_this_tmp" select="exsl:node-set($_this)" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="$_this_tmp/adm:managed-object | $_this_tmp/adm:root-managed-object" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="boolean(string($this/@abstract) = 'true')" />
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift select="boolean(string($this/@advanced) = 'true')" />
9355c1819517672f3cfe09356402fe0257c96facmatthew_swift select="boolean(string($this/@hidden) = 'true')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift select="not(local-name($this) = 'managed-object')" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="'org.opends.server.admin.std'" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="value" select="$this-name" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift select="$this/adm:profile[@name='preprocessor']/admpp:parent-managed-object[last()]/@name" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift <xsl:variable name="_top-length" select="string-length($_top-name)" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift <xsl:variable name="_this-length" select="string-length($this-name)" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift <xsl:variable name="_diff" select="$_this-length - $_top-length" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift select="substring($this-name, 1, $_diff - 1)" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift select="substring($this-name, $_diff, 1)" />
708d35fe04f46d93eac252569e7ca46b54194b08matthew_swift select="substring($this-name, $_diff + 1, $_top-length)" />
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew <xsl:when test="$_middle != '-' or $_end != $_top-name">
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew <xsl:message terminate="no">
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew <xsl:value-of
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew select="concat('The managed object ', $this-name, ' should end with ', $_top-name)" />
48224cd6d19e80b2152d9d0d8b830b6b15542fc1matthew </xsl:message>
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="value" select="$this-short-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Useful variables relating to the parent managed object.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="parent-name" select="$this/@extends" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:value-of select="$this/@parent-package" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:with-param name="value" select="$parent-name" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Useful variables relating to managed object's relations.
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$this/adm:relation[adm:profile[@name='preprocessor']/admpp:last-defined-in[@name=$this-name and @package=$this-package]]" />
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$this/adm:relation[adm:profile[@name='preprocessor']/admpp:last-defined-in[not(@name=$this-name and @package=$this-package)]]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="this-all-relations" select="$this/adm:relation" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Useful variables relating to managed object's properties.
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$this/adm:property[adm:profile[@name='preprocessor']/admpp:last-defined-in[@name=$this-name and @package=$this-package]]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="this-inherited-properties"
2fd21f254f199cb71616161617c667252fe4e7e3matthew_swift select="$this/adm:property[adm:profile[@name='preprocessor']/admpp:last-defined-in[not(@name=$this-name and @package=$this-package)]]" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift <xsl:variable name="this-all-properties" select="$this/adm:property" />
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Default rule for testing.