http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2197 *** shadow/2197 Fri Jun 15 12:46:46 2001 --- shadow/2197.tmp.23442 Fri Jun 15 12:46:46 2001 *************** *** 0 **** --- 1,92 ---- + +============================================================================+ + | runtime DOMImpl$1 error | + +----------------------------------------------------------------------------+ + | Bug #: 2197 Product: XalanJ2 | + | Status: NEW Version: 2.0.0 | + | Resolution: Platform: All | + | Severity: Major OS/Version: All | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + XSLTC compiles but gives a very terse runtime error that says + nothing more than: + + runtime error: DOMImpl$1 + + on a stylesheet with the following problematic section + + > <!-- don't output state if only doing single state --> + > <xsl:if test="string-length($mystate) != 2"> + > <xsl:if test="state"> + > <xsl:value-of select="state"/>,<xsl:text> </xsl:text> + > </xsl:if> + > </xsl:if> + > <!-- output the country if not USA --> + > <xsl:if test="country != 'USA'"> + > <xsl:value-of select="country" />,<xsl:text> </xsl:text> + > </xsl:if> + > <xsl:value-of select="location"/><xsl:text> </xsl:text> + > <xsl:if test="description"> + > (<i><xsl:value-of select="description" /></i>) + > </xsl:if> + > <!-- Contact Info --> + > <br/>Contact: <xsl:value-of select="contact/address" /> + > <xsl:if test="not(contact/phone= '')" > + > <xsl:text> </xsl:text> + > <xsl:value-of select="contact/phone" /> + > </xsl:if> + > <xsl:if test="not(contact/email= '')"> + > <xsl:text> </xsl:text> + > <xsl:variable name="malias" select="contact/email" /> + > <xsl:if test="not($malias='')"> + > <a href="mailto:{$malias}"><xsl:value-of select="contact/email" + /></a> + > </xsl:if> + > </xsl:if> + > <xsl:if test="not(contact/fax='')" > + > <xsl:text> fax:</xsl:text> + > <xsl:value-of select="contact/fax" /> + > </xsl:if> + + I got around the problem was to simplify this section as follows: + + > <!-- don't output state if only doing single state --> + > <xsl:if test="string-length($mystate) != 2"> + > <xsl:value-of select="state"/>,<xsl:text> </xsl:text> + > </xsl:if> + > <!-- output the country if not USA --> + > <xsl:if test="country != 'USA'"> + > <xsl:value-of select="country" />,<xsl:text> </xsl:text> + > </xsl:if> + > <xsl:value-of select="location"/><xsl:text> </xsl:text> + > <xsl:if test="description"> + > (<i><xsl:value-of select="description" /></i>) + > </xsl:if> + > <!-- Contact Info --> + > <br/>Contact: <xsl:value-of select="contact/address" /> + > <xsl:if test="contact/phone" > + > <xsl:text> </xsl:text> + > <xsl:value-of select="contact/phone" /> + > </xsl:if> + > <xsl:if test="contact/email"> + > <xsl:text> </xsl:text> + > <a href="mailto:{contact/email}"><xsl:value-of + select="contact/email" /></a> + > </xsl:if> + > <xsl:if test="contact/fax" > + > <xsl:text> fax:</xsl:text> + > <xsl:value-of select="contact/fax" /> + > </xsl:if> + + I've tried but haven't been able to isolate a more atomic case to reproduce this + problem, so I will attach the complete files necessary to make it happen. + + I had thought there was a problem in the XML source, but the same entry will + work when included in a set of multiple entries while hitting the DOMImpl bug + when run by itself. \ No newline at end of file