Brett Porter wrote:
how much more effort should be put into duplicating this
The hrefkey is quite easily implemented :-) The diff would be:
maven-xdoc-plugin-1.9.1\plugin-resources\site.jsl 2005-08-05
10:51:41.000000000 +-0200
@@ -511,14 +511,35 @@
<jsl:template match="escapeXml" trim="false"><j:set
var="escapedChunk"><jsl:applyTemplates/></j:set>${escapedChunk}</jsl:template>
<jsl:template match="a" trim="true">
<x:element name="a" trim="true">
<x:forEach var="attr" select="@*">
<j:choose>
- <j:when test="${attr.name == 'href'}">
- <j:set var="href" value="${attr.value}" />
+ <j:set var="attr_name" value="${attr.name}"/>
+ <j:set var="attr_value" value="${attr.value}"/>
+ <j:if test="${attr_name == 'hrefkey'}">
+ <j:set var="_bundle">
+ <x:expr select="@bundle" />
+ </j:set>
+ <j:if test="${!empty(attr_value)}">
+ <!-- If there is hrefkey, then change attr_name to
href -->
+ <!-- and attr_value to the formatted message -->
+ <j:set var="attr_name" value="href"/>
+ <!-- Default bundle is the user one in
${maven.xdoc.bundle} -->
+ <j:if test="${empty(_bundle)}">
+ <fmt:message key="${attr_value}" bundle="${myMsg}"
var="attr_value"/>
+ </j:if>
+ <j:if test="${!empty(_bundle)}">
+ <fmt:bundle basename="${_bundle}">
+ <fmt:message key="${attr_value}" var="attr_value"/>
+ </fmt:bundle>
+ </j:if>
+ </j:if>
+ </j:if>
+ <j:when test="${attr_name == 'href'}">
+ <j:set var="href" value="${attr_value}" />
<j:choose>
<j:when test="${href.startsWith('#')}">
<x:attribute name="href">
<doc:escapeNameToken value="${href}"/>
</x:attribute>
</j:when>
@@ -529,27 +550,28 @@
</j:when>
<j:otherwise>
<x:attribute name="href">${href}</x:attribute>
</j:otherwise>
</j:choose>
</j:when>
- <j:when test="${attr.name == 'target'}">
- <j:set var="target">${attr.value}</j:set>
+ <j:when test="${attr_name == 'target'}">
+ <j:set var="target">${attr_value}</j:set>
<j:if test="${!empty(target) and target.equals('_blank')}">
<x:attribute name="class">newWindow</x:attribute>
<x:attribute name="title">New Window</x:attribute>
</j:if>
<x:attribute name="target">${target}</x:attribute>
</j:when>
- <j:when test="${attr.name == 'name'}">
+ <j:when test="${attr_name == 'name'}">
<x:attribute name="name">
- <doc:escapeNameToken value="${attr.value}"/>
+ <doc:escapeNameToken value="${attr_value}"/>
</x:attribute>
</j:when>
+ <j:when test="${attr.name == 'bundle'}"/>
<j:otherwise>
- <x:attribute name="${attr.name}">${attr.value}</x:attribute>
+ <x:attribute name="${attr_name}">${attr_value}</x:attribute>
</j:otherwise>
</j:choose>
</x:forEach>
<jsl:applyTemplates/>
</x:element>
</jsl:template>
best regards,
nacho
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]