Can I use a combination of id's in result-document@href?
Posted: Fri Jun 05, 2020 5:44 pm
My problem is that I have to split a learningAssessment topic into several topics, for each child of lcInteraction.
I wrote this:
But this isn't working 
I want/need as file name the combination of the learningAssessment@id and the id of the lcInteraction child.
I wrote this:
Code: Select all
<xsl:template match="lcInteraction">
<xsl:for-each select="*">
<xsl:result-document method="xml" href="{concat(/learningAssessment/@id, '-', ./@id, '.xml')}">
<xsl:element name="qti:assessmentItem">
<xsl:attribute name="identifier">
<xsl:value-of select="concat(/learningAssessment/@id, '-', ./@id)"/>
</xsl:attribute>
</xsl:element>
</xsl:result-document>
</xsl:for-each>
</xsl:template>

I want/need as file name the combination of the learningAssessment@id and the id of the lcInteraction child.