Hi there,
I am stuck in a prolem with the XSLT 2.0 stylesheet which Michale has
commented on earlier, the thread reads: XSLT 2.0 compability issue
occured in topicmerge.XSL in DITA 1.5.1.
http://www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/201206/msg00161.html
Now a similar problem occurs:
Problem: Publishing publications with sub-map structures failed.
Log:
[xslt]
topicmerge.xsl:210:
Fatal Error! An attribute node (role) cannot be created after the
children of the containing element
Background:
An expected XML skeleton within a MERGED.XML structure shall be as follows:
<related-links>
<linkpool>
<link role="child">
<linktext>ABC</linktext>
<desc>ABCD</desc>
</link>
</linkpool>
</related-links>
Below lines are where the failure occurs:
<xsl:template match="*|@*|comment()|processing-instruction()|text()"
mode="copy-element">
<xsl:param name="src-file"></xsl:param>
<xsl:copy>
<xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"
mode="copy-element">
<xsl:with-param name="src-file"><xsl:value-of
select="$src-file"/></xsl:with-param>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
When I applied the nested Elements as follows, the build always points
me to the same line of failure:
<!--@role fixes somc start-->
<xsl:template match="*[contains(@class,' map/topicref ')][@role]">
<xsl:element name="link">
<xsl:apply-templates select="@role" mode="copy-element"/>
<xsl:attribute name="refclass"><xsl:value-of
select="$topicrefClass"/></xsl:attribute>
<xsl:apply-templates select="*" mode="copy-element"/>
<!--xsl:apply-templates select="@role" mode="copy-element"/-->
<xsl:element name="linktext"> <xsl:apply-templates select="@*"
mode="copy-element"/> </xsl:element> <desc/> </xsl:element>
<xsl:apply-templates/>
</xsl:template>
My question , how to overwrite the above line of '
<xsl:apply-templates
select="*|@*|comment()|processing-instruction()|text()"
mode="copy-element">‘ so it can ' forcefully injecting the XSL
related-links, Linkpool, Link, Linktexst plus DESC elements plus their
associated attributes'?
I look forward to hearing from you again.
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--