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> |
|
<!-- back-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"> |
<xsl:element name="REGIONENSATZ"> |
|
<!-- work on attributes --> |
<xsl:attribute name="Bild"> |
<xsl:value-of select="@image" /> |
</xsl:attribute> |
<xsl:for-each select="attribute::*"> |
<xsl:if test = "not(name(.) = ('image'))"> |
<xsl:attribute name="{name(.)}"> |
<xsl:value-of select="self::node()" /> |
</xsl:attribute> |
</xsl:if> |
</xsl:for-each> |
|
<!-- work on childs --> |
<xsl:for-each select="RECT"> |
<xsl:element name="BEREICH"> |
<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="Breite"> |
<xsl:value-of select="@b" /> |
</xsl:attribute> |
<xsl:attribute name="Hoehe"> |
<xsl:value-of select="@h" /> |
</xsl:attribute> |
<xsl:for-each select="attribute::*"> |
<xsl:if test = "not(name(.) = 'x')"> |
<xsl:if test = "not(name(.) = 'y')"> |
<xsl:if test = "not(name(.) = 'b')"> |
<xsl:if test = "not(name(.) = 'h')"> |
<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(.) = 'RECT')"> |
<xsl:copy-of select="self::node()" /> |
</xsl:if> |
</xsl:for-each> |
|
</xsl:element> |
</xsl:template> |
|
<xsl:template match="REGIONSET"> |
<xsl:copy-of select="." /> |
</xsl:template> |
|
|
</xsl:stylesheet> |