.NET choking on DocBook stylsheets html transform

View: New views
1 Messages — Rating Filter:   Alert me  

.NET choking on DocBook stylsheets html transform

by pdschuller :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am transforming a DocBook compliant xml file into html using the DocBook stylesheets distribution.  The transform runs in 2 second when I run it in the oXygen  IDE.    My website is a .NET 3.5 web site.   I am doing the transform programatically using an XslCompiledTransform, a MemoryStream etc.  That method works fine for the TOC, Introduction, and Abstract.  For the sections that have <mediaobjects> in them, I immediately get a StackOverFlow error ("the error").  I can display a source file that has one <mediaobject> but get the error if there are two.
                       
Below is one of my <mediaobjects>.  There are only two in my test file.  (There are 350+) in the file that oXygen processes in 2 seconds.  I only have to comment out the <textobject> <phrase> node to get the transform to run.
                       
<inlinemediaobject>
     <imageobject role="html">
              <imagedata format="gif" fileref="images/ch001.m436.gif" />
     </imageobject>
     <textobject>
              <phrase>in-line formula</phrase>  
     </textobject>  
</inlinemediaobject>
                       
The error occurs at a specific line of the Docbook stylesheets.  file= inline.xsl
        <xsl:template match="phrase">
           
                <xsl:call-template name="locale.html.attributes"/>
                     <xsl:if test="@role and
                        normalize-space(@role) != '' and
                        $phrase.propagates.style != 0">
                      <xsl:apply-templates select="." mode="class.attribute">
                        <xsl:with-param name="class" select="@role"/>
                      </xsl:apply-templates>
                    </xsl:if>
                    <xsl:call-template name="dir"/>
                    <xsl:call-template name="anchor"/>
                    <xsl:call-template name="simple.xlink">
                      <xsl:with-param name="content">
                        <xsl:apply-templates/>
                      </xsl:with-param>
                    </xsl:call-template>
                    <xsl:call-template name="apply-annotations"/>
                 

                </xsl:template>
                               
msdn says that the StackOverFlow error is thrown when there is recursion and does not require an infinite loop.  but my test file has only two of the <phrase> nodes.  Even when the test file runs OK it takes 32 seconds for the webpage to display - which is way too long.

Ideas?  Thanks.