othermeta/name/content completion framework extension
Posted: Wed Apr 10, 2024 10:28 pm
I would like to specify values for the @content attribute of the <othermeta> element in a map based on the @name attribute value.
For example:
Where content = User Guide, Installation Guide, or other defined values
and
Where content = Active or Discontinued
I have already extended a custom dita map framework with resources/cc_config_ext.xml with proposed values for the <permissions> element @view attribute using the following instructions:
https://www.oxygenxml.com/doc/versions/ ... osals.html
As expected, this method will not work for othermeta @content due to the dependency on the @name attribute. If I try it anyway as a test, the first value set for content in my config file is used for all @content instances in my map.
To do this correctly based on the context, I have tried the steps in the following articles:
https://blog.oxygenxml.com/topics/contr ... lues2.html
https://www.oxygenxml.com/doc/versions/ ... in_context
When testing these two methods one at a time, I placed either the getvalues.xsl or meta.xsl files in the resources folder and have also tried within resources/xsl to no avail.
For meta.xsl, I used the code from the article and customized the xsl:choose as follows:
For getvalues, I tried the following:
I have confirmed that the resources folder of my custom framework is listed above the base framework resources folder on the Classpath tab, as the permissions customization is working.
I'm missing something somewhere and am attaching the files in case anyone can see what I've done wrong. Note: I am using Oxygen 23.1 right now but will be upgrading to the latest version in the next month or so.
For example:
Code: Select all
<othermeta name="doctype" content="User Guide"/>
and
Code: Select all
<othermeta name="product-status" content="Active"/>
I have already extended a custom dita map framework with resources/cc_config_ext.xml with proposed values for the <permissions> element @view attribute using the following instructions:
https://www.oxygenxml.com/doc/versions/ ... osals.html
As expected, this method will not work for othermeta @content due to the dependency on the @name attribute. If I try it anyway as a test, the first value set for content in my config file is used for all @content instances in my map.
To do this correctly based on the context, I have tried the steps in the following articles:
https://blog.oxygenxml.com/topics/contr ... lues2.html
https://www.oxygenxml.com/doc/versions/ ... in_context
When testing these two methods one at a time, I placed either the getvalues.xsl or meta.xsl files in the resources folder and have also tried within resources/xsl to no avail.
For meta.xsl, I used the code from the article and customized the xsl:choose as follows:
Code: Select all
<items>
<xsl:choose>
<xsl:when test="$name = 'doctype'">
<item value="Installation Guide">
<item value="User Guide">
</xsl:when>
<xsl:when test="$name = 'product-status'">
<item value="Active"/>
<item value="Discontinued"/>
</xsl:when>
</xsl:choose>
</items>
Code: Select all
<items>
<xsl:if test="$propertyElement/@name = 'doctype'">
<item value='Installation Guide'>
<item value='User Guide'>
</xsl:if>
<xsl:if test="$propertyElement/@name = 'product-status'">
<item value='Active'/>
<item value='Discontinued'/>
</xsl:if>
</items>
I'm missing something somewhere and am attaching the files in case anyone can see what I've done wrong. Note: I am using Oxygen 23.1 right now but will be upgrading to the latest version in the next month or so.