messagesMO.xsl revision 3cbc49fe5e6d8a00a69fe1859874ed5dcff85aeb
0N/A ! The contents of this file are subject to the terms of the 0N/A ! Common Development and Distribution License, Version 1.0 only 0N/A ! (the "License"). You may not use this file except in compliance 2362N/A ! You can obtain a copy of the license at 0N/A ! See the License for the specific language governing permissions 0N/A ! and limitations under the License. 0N/A ! When distributing Covered Code, include this CDDL HEADER in each 0N/A ! file and include the License file at 0N/A ! add the following below this CDDL HEADER, with the fields enclosed 0N/A ! by brackets "[]" replaced with your own identifying information: 0N/A ! Portions Copyright [yyyy] [name of copyright owner] 0N/A ! Portions Copyright 2007 Sun Microsystems, Inc. 0N/A<
xsl:
stylesheet version="1.0" 0N/A <
xsl:
output method="text" encoding="us-ascii" />
0N/A <
xsl:
template match="/">
0N/A Generate user friendly names. 0N/A select="concat('user-friendly-name=', $this-ufn, '
')" />
0N/A select="concat('user-friendly-plural-name=', $this-ufpn, '
')" />
0N/A Pull out the managed object synopsis (mandatory). 0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No synopsis found for managed object definition ', $this-name)" />
0N/A select="concat('synopsis=', normalize-space($this/adm:synopsis), '
')" />
0N/A Pull out the managed object description (optional). 0N/A select="concat('description=', normalize-space($this/adm:description), '
')" />
0N/A Process tag definitions if this is the root configuration. 0N/A <
xsl:
if test="$this-is-root">
0N/A <
xsl:
sort select="@name" />
0N/A select="concat('tag.', @name, '.synopsis=', normalize-space(adm:synopsis), '
')" />
0N/A Process each property definition. 0N/A <
xsl:
for-
each select="$this-all-properties">
0N/A <
xsl:
sort select="@name" />
0N/A Pull out the property definition synopsis (mandatory). 0N/A <
xsl:
if test="not(adm:synopsis)">
0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
0N/A select="concat('property.', normalize-space(@name), '.synopsis=', normalize-space(adm:synopsis), '
')" />
0N/A Pull out the property definition description (optional). 0N/A <
xsl:
if test="adm:description">
0N/A select="concat('property.', normalize-space(@name), '.description=', normalize-space(adm:description), '
')" />
0N/A Process alias default behavior synopsis. 0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No alias default behavior synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
0N/A Process requires admin action synopsis if present. 0N/A <
xsl:
if test="adm:requires-admin-action/*/adm:synopsis">
0N/A Process syntax related descriptions. 0N/A Process integer syntax unit synopsis (optional). 0N/A Process string syntax pattern synopsis (mandatory if pattern defined). 0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No string pattern synopsis found for property ', @name, ' in managed object definition ', $this-name)" />
0N/A Process enumeration value synopsis (mandatory). 0N/A <
xsl:
sort select="@name" />
0N/A <
xsl:
if test="not(adm:synopsis)">
0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No synopsis found for enumeration value ', @name, ' for property ', ../../../@name, ' in managed object definition ', $this-name)" />
0N/A select="concat('property.', normalize-space(../../../@name), '.syntax.enumeration.value.', @name,'.synopsis=', normalize-space(adm:synopsis), '
')" />
0N/A Process each relation definition. 0N/A <
xsl:
for-
each select="$this-all-relations">
0N/A <
xsl:
sort select="@name" />
0N/A Generate user friendly names. 0N/A select="concat('relation.', normalize-space(@name), '.user-friendly-name=')" />
0N/A <
xsl:
call-
template name="name-to-ufn">
0N/A <
xsl:
with-
param name="value" select="@name" />
0N/A </
xsl:
call-
template>
0N/A <
xsl:
value-
of select="'
'" />
0N/A <
xsl:
if test="adm:one-to-many">
0N/A select="concat('relation.', normalize-space(@name), '.user-friendly-plural-name=')" />
0N/A <
xsl:
call-
template name="name-to-ufn">
0N/A <
xsl:
with-
param name="value" 0N/A select="adm:one-to-many/@plural-name" />
0N/A </
xsl:
call-
template>
0N/A <
xsl:
value-
of select="'
'" />
0N/A Pull out the relation definition synopsis (mandatory). 0N/A <
xsl:
if test="not(adm:synopsis)">
0N/A <
xsl:
message terminate="yes">
0N/A select="concat('No synopsis found for relation ', @name, ' in managed object definition ', $this-name)" />
0N/A select="concat('relation.', normalize-space(@name), '.synopsis=', normalize-space(adm:synopsis), '
')" />
0N/A Pull out the relation definition description (optional). 0N/A <
xsl:
if test="adm:description">
0N/A select="concat('relation.', normalize-space(@name), '.description=', normalize-space(adm:description), '
')" />