messagesMO.xsl revision 44d9730b69143d1fd7cd8b382b557e2c9d65225e
10139N/A<!--
10139N/A ! CDDL HEADER START
10139N/A !
10139N/A ! The contents of this file are subject to the terms of the
10139N/A ! Common Development and Distribution License, Version 1.0 only
10139N/A ! (the "License"). You may not use this file except in compliance
10139N/A ! with the License.
10139N/A !
10139N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
10139N/A ! or http://forgerock.org/license/CDDLv1.0.html.
10139N/A ! See the License for the specific language governing permissions
10139N/A ! and limitations under the License.
10139N/A !
12104N/A ! When distributing Covered Code, include this CDDL HEADER in each
10139N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
10139N/A ! If applicable, add the following below this CDDL HEADER, with the
10139N/A ! fields enclosed by brackets "[]" replaced with your own identifying
10139N/A ! information:
10139N/A ! Portions Copyright [yyyy] [name of copyright owner]
12104N/A !
10142N/A ! CDDL HEADER END
10142N/A !
10139N/A !
12107N/A ! Copyright 2007-2008 Sun Microsystems, Inc.
10139N/A ! -->
10139N/A<xsl:stylesheet version="1.0"
10139N/A xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
12107N/A xmlns:adm="http://opendj.forgerock.org/admin"
10139N/A xmlns:ldap="http://opendj.forgerock.org/admin-ldap">
10139N/A <xsl:import href="java-utilities.xsl" />
10139N/A <xsl:import href="preprocessor.xsl" />
10139N/A <xsl:import href="property-types.xsl" />
10139N/A <xsl:output method="text" encoding="us-ascii" />
10139N/A <!--
10139N/A Document parsing.
12107N/A -->
11438N/A <xsl:template match="/">
12107N/A <!--
10139N/A Generate user friendly names.
11419N/A -->
12107N/A <xsl:value-of
11419N/A select="concat('user-friendly-name=', $this-ufn, '&#xa;')" />
11419N/A <xsl:value-of
11419N/A select="concat('user-friendly-plural-name=', $this-ufpn, '&#xa;')" />
11419N/A <!--
11438N/A Pull out the managed object synopsis (mandatory).
12107N/A -->
11981N/A <xsl:if test="not($this/adm:synopsis)">
12127N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No synopsis found for managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('synopsis=', normalize-space($this/adm:synopsis), '&#xa;')" />
10139N/A <!--
10139N/A Pull out the managed object description (optional).
10139N/A -->
10139N/A <xsl:if test="$this/adm:description">
10139N/A <xsl:value-of
10139N/A select="concat('description=', normalize-space($this/adm:description), '&#xa;')" />
10139N/A </xsl:if>
10139N/A <!--
10139N/A Process tag definitions if this is the root configuration.
10139N/A -->
10139N/A <xsl:if test="$this-is-root">
10139N/A <xsl:for-each select="$this/adm:tag-definition">
10139N/A <xsl:sort select="@name" />
10139N/A <xsl:value-of
10139N/A select="concat('tag.', @name, '.synopsis=', normalize-space(adm:synopsis), '&#xa;')" />
10139N/A </xsl:for-each>
10139N/A </xsl:if>
10139N/A <!--
10139N/A Process any constraints associated with this managed object definition.
10139N/A -->
10139N/A <xsl:if test="$this/adm:constraint">
10139N/A <xsl:for-each select="$this/adm:constraint">
10139N/A <xsl:value-of
10139N/A select="concat('constraint.', position(), '.synopsis=', normalize-space(adm:synopsis), '&#xa;')" />
10139N/A </xsl:for-each>
10139N/A </xsl:if>
10139N/A <!--
10139N/A Process each property definition.
10139N/A -->
10139N/A <xsl:for-each select="$this-all-properties">
10139N/A <xsl:sort select="@name" />
10139N/A <!--
10139N/A Pull out the property definition synopsis (mandatory).
10139N/A -->
10139N/A <xsl:if test="not(adm:synopsis)">
10139N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(@name), '.synopsis=', normalize-space(adm:synopsis), '&#xa;')" />
10139N/A <!--
10139N/A Pull out the property definition description (optional).
10139N/A -->
10139N/A <xsl:if test="adm:description">
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(@name), '.description=', normalize-space(adm:description), '&#xa;')" />
10139N/A </xsl:if>
10139N/A <!--
10139N/A Process alias default behavior synopsis.
10139N/A -->
10139N/A <xsl:if test="adm:default-behavior/adm:alias">
10139N/A <xsl:if
10139N/A test="not(adm:default-behavior/adm:alias/adm:synopsis)">
10139N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No alias default behavior synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(@name), '.default-behavior.alias.synopsis=', normalize-space(adm:default-behavior/adm:alias/adm:synopsis), '&#xa;')" />
10139N/A </xsl:if>
10139N/A <!--
10139N/A Process requires admin action synopsis if present.
10142N/A -->
10139N/A <xsl:if test="adm:requires-admin-action/*/adm:synopsis">
10139N/A <xsl:value-of
12104N/A select="concat('property.', normalize-space(@name), '.requires-admin-action.synopsis=', normalize-space(adm:requires-admin-action/*/adm:synopsis), '&#xa;')" />
10139N/A </xsl:if>
12125N/A <!--
12125N/A Process syntax related descriptions.
10139N/A -->
10139N/A <xsl:choose>
12104N/A <xsl:when test="adm:syntax/adm:aggregation">
12104N/A <!--
11855N/A Process aggregation constraint synopsis (optional).
12104N/A -->
11855N/A <xsl:if
11855N/A test="adm:syntax/adm:aggregation/adm:constraint/adm:synopsis">
11855N/A <xsl:value-of
11855N/A select="concat('property.', normalize-space(@name), '.syntax.aggregation.constraint-synopsis=', normalize-space(adm:syntax/adm:aggregation/adm:constraint/adm:synopsis), '&#xa;')" />
10981N/A </xsl:if>
12104N/A </xsl:when>
10981N/A <xsl:when test="adm:syntax/adm:integer">
12127N/A <!--
10139N/A Process integer syntax unit synopsis (optional).
10139N/A -->
10139N/A <xsl:if test="adm:syntax/adm:integer/adm:synopsis">
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(@name), '.syntax.integer.unit-synopsis=', normalize-space(adm:syntax/adm:integer/adm:synopsis), '&#xa;')" />
10142N/A </xsl:if>
10139N/A </xsl:when>
10139N/A <xsl:when test="adm:syntax/adm:string/adm:pattern">
10139N/A <!--
10139N/A Process string syntax pattern synopsis (mandatory if pattern defined).
10139N/A -->
10139N/A <xsl:if
10139N/A test="not(adm:syntax/adm:string/adm:pattern/adm:synopsis)">
10139N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No string pattern synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(@name), '.syntax.string.pattern.synopsis=', normalize-space(adm:syntax/adm:string/adm:pattern/adm:synopsis), '&#xa;')" />
10139N/A </xsl:when>
10139N/A <xsl:when test="adm:syntax/adm:enumeration">
10139N/A <!--
10139N/A Process enumeration value synopsis (mandatory).
10139N/A -->
10139N/A <xsl:for-each select="adm:syntax/adm:enumeration/adm:value">
10139N/A <xsl:sort select="@name" />
10139N/A <xsl:if test="not(adm:synopsis)">
10139N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No synopsis found for enumeration value ', @name, ' for property ', ../../../@name, ' in managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('property.', normalize-space(../../../@name), '.syntax.enumeration.value.', @name,'.synopsis=', normalize-space(adm:synopsis), '&#xa;')" />
10139N/A </xsl:for-each>
10139N/A </xsl:when>
10139N/A </xsl:choose>
10139N/A </xsl:for-each>
10139N/A <!--
10139N/A Process each relation definition.
10139N/A -->
10139N/A <xsl:for-each select="$this-all-relations">
10139N/A <xsl:sort select="@name" />
10139N/A <!--
10139N/A Generate user friendly names.
10139N/A -->
10139N/A <xsl:value-of
10139N/A select="concat('relation.', normalize-space(@name), '.user-friendly-name=')" />
10139N/A <xsl:call-template name="name-to-ufn">
10139N/A <xsl:with-param name="value" select="@name" />
10139N/A </xsl:call-template>
10139N/A <xsl:value-of select="'&#xa;'" />
10139N/A <xsl:if test="adm:one-to-many">
10139N/A <xsl:value-of
10139N/A select="concat('relation.', normalize-space(@name), '.user-friendly-plural-name=')" />
10139N/A <xsl:call-template name="name-to-ufn">
10139N/A <xsl:with-param name="value"
10139N/A select="adm:one-to-many/@plural-name" />
10139N/A </xsl:call-template>
10139N/A <xsl:value-of select="'&#xa;'" />
10139N/A </xsl:if>
10139N/A <!--
10139N/A Pull out the relation definition synopsis (mandatory).
10139N/A -->
10139N/A <xsl:if test="not(adm:synopsis)">
10139N/A <xsl:message terminate="yes">
10139N/A <xsl:value-of
10139N/A select="concat('No synopsis found for relation ', @name, ' in managed object definition ', $this-name)" />
10139N/A </xsl:message>
10139N/A </xsl:if>
10139N/A <xsl:value-of
10139N/A select="concat('relation.', normalize-space(@name), '.synopsis=', normalize-space(adm:synopsis), '&#xa;')" />
10139N/A <!--
10139N/A Pull out the relation definition description (optional).
10139N/A -->
10139N/A <xsl:if test="adm:description">
10139N/A <xsl:value-of
10139N/A select="concat('relation.', normalize-space(@name), '.description=', normalize-space(adm:description), '&#xa;')" />
10139N/A </xsl:if>
10139N/A </xsl:for-each>
10139N/A </xsl:template>
10139N/A</xsl:stylesheet>
10139N/A