Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


,NET choking on DocBook stylsheets

From: pschuller@-----------.---------.---
To: NULL
Date: 7/3/2009 12:34:00 PM
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">
	    <span>
		<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"/>
		  </span>
		</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.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent