meta.server.xslt added classes

This commit is contained in:
ialbert 2022-11-03 11:59:40 +03:00
parent bbf64d6230
commit 0ed21584c1

View file

@ -47,19 +47,19 @@
<xsl:template match="*" mode="types"> <xsl:template match="*" mode="types">
<xsl:if test="position() > 1">,</xsl:if> <xsl:if test="position() > 1">,</xsl:if>
{ {
"<xsl:value-of select="name(.)"/>": { "code": "<xsl:value-of select="name(.)"/>",
<xsl:for-each select="@*"> <xsl:for-each select="@*">
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>" "<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>"
<xsl:if test="position() != last()">,</xsl:if> <xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each> </xsl:for-each>
}} }
</xsl:template> </xsl:template>
<xsl:template match="*" mode="enums"> <xsl:template match="*" mode="enums">
<xsl:if test="position() > 1">,</xsl:if> <xsl:if test="position() > 1">,</xsl:if>
"<xsl:value-of select="name(.)"/>": { "<xsl:value-of select="name(.)"/>": {
<xsl:for-each select="@*[name()!='class']"> <xsl:for-each select="@*">
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>", "<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>",
</xsl:for-each> </xsl:for-each>
"fields": [<xsl:apply-templates select="*" mode="field"/>] "fields": [<xsl:apply-templates select="*" mode="field"/>]
@ -70,7 +70,7 @@
<xsl:template match="*" mode="objects"> <xsl:template match="*" mode="objects">
<xsl:if test="position() > 1">,</xsl:if> <xsl:if test="position() > 1">,</xsl:if>
"<xsl:value-of select="name(.)"/>": { "<xsl:value-of select="name(.)"/>": {
<xsl:for-each select="@*[name()!='class']"> <xsl:for-each select="@*">
"<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>", "<xsl:value-of select="name()"/>": "<xsl:value-of select="."/>",
</xsl:for-each> </xsl:for-each>
"fields": [<xsl:apply-templates select="*[name()!='actions']" mode="field"/>] "fields": [<xsl:apply-templates select="*[name()!='actions']" mode="field"/>]
@ -148,8 +148,7 @@
<xsl:template match="*" mode="field"> <xsl:template match="*" mode="field">
<xsl:if test="position() > 1">,</xsl:if> <xsl:if test="position() > 1">,</xsl:if>
{"<xsl:value-of select="name()"/>": {"code": "<xsl:value-of select="name()"/>",
{
<xsl:for-each select="@*"> <xsl:for-each select="@*">
<xsl:choose> <xsl:choose>
<xsl:when test="name()='type'">"<xsl:value-of select="name()"/>": <xsl:value-of select="."/></xsl:when> <xsl:when test="name()='type'">"<xsl:value-of select="name()"/>": <xsl:value-of select="."/></xsl:when>
@ -164,7 +163,7 @@
</xsl:choose> </xsl:choose>
<xsl:if test="position() != last()">,</xsl:if> <xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each> </xsl:for-each>
}} }
</xsl:template> </xsl:template>
<xsl:template match="value"> <xsl:template match="value">