1,13 → 1,70 |
<!-- status: testing for regioneditor --> |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
<xsl:output method="xml" indent="yes" /> |
|
<xsl:template match="/"> |
<xsl:apply-templates /> |
</xsl:template> |
|
<xsl:template match="node()"> |
<xsl:copy-of select="." /> |
</xsl:template> |
|
<!-- to-direction - status: ready for regioneditor --> |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
<xsl:output method="xml" indent="yes" /> |
|
|
<xsl:template match="/"> |
<xsl:apply-templates /> |
</xsl:template> |
|
|
<xsl:template match="REGIONENSATZ"><!-- element-plugin association --> |
<xsl:element name="REGIONSET"> |
|
<!-- work on attributes --> |
<xsl:attribute name="image"> |
<xsl:value-of select="@Bild" /> |
</xsl:attribute> |
<xsl:for-each select="attribute::*"> |
<xsl:if test = "not(name(.) = ('Bild'))"> |
<xsl:attribute name="{name(.)}"> |
<xsl:value-of select="self::node()" /> |
</xsl:attribute> |
</xsl:if> |
</xsl:for-each> |
|
<!-- work on childs --> |
<xsl:for-each select="BEREICH"> |
<xsl:element name="RECT"> |
<xsl:attribute name="x"> |
<xsl:value-of select="@x" /> |
</xsl:attribute> |
<xsl:attribute name="y"> |
<xsl:value-of select="@y" /> |
</xsl:attribute> |
<xsl:attribute name="b"> |
<xsl:value-of select="@Breite" /> |
</xsl:attribute> |
<xsl:attribute name="h"> |
<xsl:value-of select="@Hoehe" /> |
</xsl:attribute> |
<xsl:for-each select="attribute::*"> |
<xsl:if test = "not(name(.) = 'x')"> |
<xsl:if test = "not(name(.) = 'y')"> |
<xsl:if test = "not(name(.) = 'Breite')"> |
<xsl:if test = "not(name(.) = 'Hoehe')"> |
<xsl:attribute name="{name(.)}"> |
<xsl:value-of select="self::node()" /> |
</xsl:attribute> |
</xsl:if></xsl:if></xsl:if></xsl:if> |
</xsl:for-each> |
<xsl:for-each select="node()"> |
<xsl:copy-of select="self::node()" /> |
</xsl:for-each> |
</xsl:element> |
</xsl:for-each> |
<xsl:for-each select="node()"> |
<xsl:if test = "not(name(.) = 'BEREICH')"> |
<xsl:copy-of select="self::node()" /> |
</xsl:if> |
</xsl:for-each> |
|
</xsl:element> |
</xsl:template> |
|
<xsl:template match="REGIONSET"><!-- element-plugin association --> |
<xsl:copy-of select="." /> |
</xsl:template> |
|
|
</xsl:stylesheet> |