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