Project

Profile

Help

Error creating an attribute

Added by Anonymous about 17 years ago

Legacy ID: #4584734 Legacy Poster: Andrew Fang (afang4)

The following stylesheet generates the error using Saxon 8.9 but fine with Saxon 6.5. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0" > <xsl:template match="/"> <fo:root> <xsl:apply-templates/> </fo:root> </xsl:template> <xsl:template match="doc" priority="0"> <fo:page-sequence role="subhead"> <fo:flow flow-name="xsl-region-body"> <fo:block> <xsl:if test="@pgwide and string(@pgwide)='yes'"/> <xsl:attribute name="break-before">auto</xsl:attribute> </fo:block> </fo:flow> </fo:page-sequence> </xsl:template> </xsl:stylesheet> The Error: XTDE0410: Cannot create an attribute node after creating a child of the containing element ... line 17 Granted that the <xsl:if/> statement does nothing in this stylesheet and can be easily removed to avoid the problem. However, the stylesheet is auto-generated and <xsl:if/> may contain other attributes in some cases. Is this a bug? Thanks a lot for your help. Andrew


Replies (1)

RE: Error creating an attribute - Added by Anonymous about 17 years ago

Legacy ID: #4584771 Legacy Poster: Michael Kay (mhkay)

Yes, this is a bug. Saxon 8.9 introduced static checking for this condition and it's sometimes a bit too pessimistic in its analysis. It's fixed in the latest code, including 8.9.9.2 which is available as a beta release.

    (1-1/1)

    Please register to reply