config_tools: add placeholders in input widgets

The configurator today shows "Please Input" as the placeholder of input
widgets, which is far from informative.

This patch specifies element or type specific placeholders in the XML
schema by reusing the `acrn:widget-options` annotation mechanism. For
manually-designed widgets such as ivshmem or vUART the placeholders are
added in the corresponding vue directly.

Tracked-On: #6691
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2022-05-13 10:59:12 +08:00
committed by acrnsi-robot
parent c96fb1cb0a
commit 72445d01b4
7 changed files with 53 additions and 49 deletions

View File

@@ -5,7 +5,7 @@
<xsl:variable name="section_adornment" select="'#*=-%+@`'"/>
<xsl:variable name="vLower" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="vUpper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<!-- xslt script to autogenerate config option documentation -->
<!-- xslt script to autogenerate config option documentation -->
<!-- Get things started with the ACRNConfigType element -->
<xsl:template match="/xs:schema">
<xsl:apply-templates select="xs:complexType[@name='ACRNConfigType']">
@@ -204,6 +204,11 @@
<xsl:with-param name="indent" select="' '"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="starts-with(xs:restriction/@base, 'xs:')">
<xsl:variable name="ty" select="xs:restriction/@base"/>
<xsl:value-of select="concat(translate(substring($ty, 4,1), $vLower, $vUpper), substring($ty,5),' value')"/>
<xsl:value-of select="$newline"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>No type annotation found</xsl:text>
<xsl:value-of select="$newline"/>