hallo,
habe meine xslt Datei hundert Mal verändert. Bin im moment wieder hier "dir.xslt": ~~~xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:wpml="http://www.avt.rwth-aachen.de/ontologies/wpml.owl#"
xmlns:bp="http://www.avt.rwth-aachen.de/batchPlus"
xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon" >
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<!--<xsl:variable name="counter" saxon:assignable="yes">1</xsl:variable>-->
<xsl:template match="bp:model">
bp:model
<xsl:call-template name="zaehlen"/>
</bp:model>
</xsl:template>
<xsl:template name="zaehlen">
<xsl:param name="zahl" select="0"/>
<xsl:for-each-group select="bp:Step" group-by="@bp:id">
bp:Step
<xsl:attribute name="bp:id" select="position()"/>
<xsl:attribute name="rdf:id" select="@rdf:id"/>
<xsl:for-each select="unitProcedure" >
<unitProcedure>
<xsl:attribute name="bp:id"><xsl:number level="any"/> </xsl:attribute>
<xsl:attribute name="bp:up" select="@bp:up"/>
<xsl:attribute name="rdf:id" select="@rdf:id"/>
<xsl:copy-of select="label"/>
<xsl:for-each select="operation">
<xsl:call-template name="zaehlen">
<xsl:with-param name="zahl" select="$zahl+ 1"/>
</xsl:call-template>
<operation>
<xsl:attribute name="bp:id"><xsl:value-of select="$zahl"/> </xsl:attribute>
<xsl:attribute name="bp:op" select="@bp:op"/>
<xsl:attribute name="rdf:id" select="@rdf:id"/>
<xsl:copy-of select="label"/></operation>
</xsl:for-each>
</unitProcedure>
</xsl:for-each></bp:Step></xsl:for-each-group>
</xsl:template>
</xsl:stylesheet>