From xalanmjones@example.com Mon Sep 01 03:02:37 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 32712 invoked from network); 1 Sep 2008 03:02:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 03:02:37 -0000 Received: (qmail 95821 invoked by uid 500); 1 Sep 2008 03:02:34 -0000 Delivered-To: mjones@example.com Received: (qmail 95779 invoked by uid 500); 1 Sep 2008 03:02:34 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 95768 invoked by uid 99); 1 Sep 2008 03:02:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 Aug 2008 20:02:34 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 03:01:43 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 55BEE234C1B8 for <mjones@example.com>; Sun, 31 Aug 2008 20:01:44 -0700 (PDT) Message-ID: <1607199548.1220238104336.JavaMail.jira@brutus> Date: Sun, 31 Aug 2008 20:01:44 -0700 (PDT) From: "Henry Zongaro (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Commented: (XALANJ-2453) ClassCastException during transformation In-Reply-To: <220627399.1219934444526.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627374#action_12627374 ] Henry Zongaro commented on XALANJ-2453: --------------------------------------- I'm not yet sure what's causing the problem, but I do see that you can work around the problem by changing line 114 of svg2vml.xsl from this <xsl:when test="((count(ancestor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4svg:svg) = 0) and (@width | @height | @viewBox)) or (count(ancestor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4svg:svg) &gt; 0)"> to the following, which is equivalent <xsl:when test="((count(ancestor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4svg:svg) = 0) and count(@width | @height | @viewBox) != 0) or (count(ancestor888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4svg:svg) &gt; 0)"> > ClassCastException during transformation > ---------------------------------------- > > Key: XALANJ-2453 > URL: https://issues.apache.org/jira/browse/XALANJ-2453 > Project: XalanJ2 > Issue Type: Bug > Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects. Anybody can view the issue.) > Components: transformation > Affects Versions: 2.7.1, 2.7 > Environment: GNU/Linux 2.6 kernel 32-bit, Sun JRE 1.5.0_13, Xalan 2.7.1 and libs included with the Xalan 2.7.1 distro. > Reporter: Christopher Schultz > Attachments: test.svg, VectorConverter-SVG2VML-transformer.zip > > > Using an XSLT found in the VectorConverter 1.2 package to convert an SVG document into a VML document, the following exception is generated. I started out using Cocoon, which provides the full stack trace shown below. The command-line use of Xalan shows a less useful message, which is also included below. I will include an example SVG that fails to transform, and I'll see if I'm permitted to attach the XSLT in question from VectorConverter, or if you'll have to go get it yourselves to reproduce (sorry). > First, the CLI message: > file:///path/to/svg2vml.xsl; Line #114; Column #122; org.apache.xpath.objects.XBooleanStatic > Now, the full stack trace provided by Cocoon: > java.lang.ClassCastException: org.apache.xpath.objects.XBooleanStatic > at org.apache.xpath.axes.FilterExprIteratorSimple.executeFilterExpr(FilterExprIteratorSimple.java:116) > at org.apache.xpath.axes.FilterExprWalker.setRoot(FilterExprWalker.java:131) > at org.apache.xpath.axes.WalkingIterator.setRoot(WalkingIterator.java:157) > at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:265) > at org.apache.xpath.axes.LocPathIterator.asIterator(LocPathIterator.java:269) > at org.apache.xpath.axes.UnionPathIterator.setRoot(UnionPathIterator.java:80) > at org.apache.xpath.axes.LocPathIterator.asNode(LocPathIterator.java:300) > at org.apache.xpath.axes.LocPathIterator.bool(LocPathIterator.java:320) > at org.apache.xpath.operations.And.bool(And.java:72) > at org.apache.xpath.operations.Or.bool(Or.java:72) > at org.apache.xpath.XPath.bool(XPath.java:412) > at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:126) > at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) > at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270) > at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356) > at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447) > at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408) > at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56) > at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586) > at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:183) > at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367) > at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447) > at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408) > at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56) > at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586) > at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) > at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) > at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:334) > at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:326) > at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579) > at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:279) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481) > at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:121) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) > at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253) > at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) > at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253) > at org.apache.cocoon.Cocoon.process(Cocoon.java:699) > at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) > at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) > at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:595) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 09:46:36 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 42747 invoked from network); 1 Sep 2008 09:46:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 09:46:36 -0000 Received: (qmail 359 invoked by uid 500); 1 Sep 2008 09:46:34 -0000 Delivered-To: mjones@example.com Received: (qmail 159 invoked by uid 500); 1 Sep 2008 09:46:33 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 148 invoked by uid 99); 1 Sep 2008 09:46:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 02:46:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:45:43 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 5C95B234C1B8 for <mjones@example.com>; Mon, 1 Sep 2008 02:45:44 -0700 (PDT) Message-ID: <1704968744.1220262344374.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 02:45:44 -0700 (PDT) From: "Richard Evans (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Commented: (XALANJ-2419) Astral characters written as a pair of NCRs with the surrogate scalar values when using UTF-8 In-Reply-To: <27307016.1199272114138.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627425#action_12627425 ] Richard Evans commented on XALANJ-2419: --------------------------------------- This is a serious problem because Xalan fails to encode any of the Unicode supplementary characters. The version shipped with Java 1.6 does not have this problem. However if I need to run with Java 1.5 (on systems which do not support 1.6), there is no solution for encoding supplementary characters - the 1.5 built in code does not handle them and plugging in a different Xalan will not help. > Astral characters written as a pair of NCRs with the surrogate scalar values when using UTF-8 > --------------------------------------------------------------------------------------------- > > Key: XALANJ-2419 > URL: https://issues.apache.org/jira/browse/XALANJ-2419 > Project: XalanJ2 > Issue Type: Bug > Components: Serialization > Affects Versions: 2.7.1 > Reporter: Henri Sivonen > > org.apache.xml.serializer.ToStream contains the following code: > else if (m_encodingInfo.isInEncoding(ch)) { > // If the character is in the encoding, and > // not in the normal ASCII range, we also > // just leave it get added on to the clean characters > > } > else { > // This is a fallback plan, we should never get here > // but if the character wasn't previously handled > // (i.e. isn't in the encoding, etc.) then what > // should we do? We choose to write out an entity > writeOutCleanChars(chars, i, lastDirtyCharProcessed); > writer.write("&#"); > writer.write(Integer.toString(ch)); > writer.write(';'); > lastDirtyCharProcessed = i; > } > This leads to the wrong (latter) if branch running for surrogates, because isInEncoding() for UTF-8 returns false for surrogates. It is always wrong (regardless of encoding) to escape a surrogate as an NCR. > The practical effect of this bug is that any document with astral characters in it ends up in an ill-formed serialization and does not parse back using an XML parser. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 12:23:08 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 18048 invoked from network); 1 Sep 2008 12:23:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 12:23:08 -0000 Received: (qmail 45936 invoked by uid 500); 1 Sep 2008 12:23:06 -0000 Delivered-To: mjones@example.com Received: (qmail 45903 invoked by uid 500); 1 Sep 2008 12:23:06 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 45892 invoked by uid 99); 1 Sep 2008 12:23:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 05:23:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 12:22:15 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 0DF8D234C1C3 for <mjones@example.com>; Mon, 1 Sep 2008 05:22:46 -0700 (PDT) Message-ID: <286517538.1220271766042.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 05:22:46 -0700 (PDT) From: "Tomas Jetelina (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANJ-2454) ArrayIndexOutOfBoundsException when xalan-doc-cache-off MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org ArrayIndexOutOfBoundsException when xalan-doc-cache-off ------------------------------------------------------- Key: XALANJ-2454 URL: https://issues.apache.org/jira/browse/XALANJ-2454 Project: XalanJ2 Issue Type: Bug Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: DTM, Xalan, XPath Affects Versions: 2.7.1 Environment: Microsoft Windows XP PRO SP2, Java 83.161.120.155, Intel Pentium 1.6 GHz, 1,5 GB RAM Reporter: Tomas Jetelina Priority: Critical When processing transformation with many files accessed in xsl document() function followed by xPath expression, on 32-bit machine I run very quickly out of memory - http://xml.apache.org/xalan-j/faq.html#faq-N102F9 Trying <?xalan-doc-cache-off?> brings ArrayIndexOutOfBoundsException in ExpandedNameTable.getType() Workaround, no document cache option or improvement in caching management would be very appreciated. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 16:07:16 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 45949 invoked from network); 1 Sep 2008 16:07:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 16:07:16 -0000 Received: (qmail 53085 invoked by uid 500); 1 Sep 2008 16:07:14 -0000 Delivered-To: mjones@example.com Received: (qmail 52892 invoked by uid 500); 1 Sep 2008 16:07:14 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 52881 invoked by uid 99); 1 Sep 2008 16:07:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:07:14 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 16:06:15 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 27E8F234C1C3 for <mjones@example.com>; Mon, 1 Sep 2008 09:06:46 -0700 (PDT) Message-ID: <727113887.1220285206162.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 09:06:46 -0700 (PDT) From: "Romeu Flores (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANJ-2455) CLONE -XPath ignores namespace declarations except on root element MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org CLONE -XPath ignores namespace declarations except on root element ------------------------------------------------------------------ Key: XALANJ-2455 URL: https://issues.apache.org/jira/browse/XALANJ-2455 Project: XalanJ2 Issue Type: Bug Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: XPath Affects Versions: 2.5Dx Environment: Operating System: Windows NT/2K Platform: PC Reporter: Romeu Flores Assignee: Xalan Developers Mailing List By my reading of the XML standards, this document should be valid: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> and I should be able to search for //bar:Bar using the XPath implementation in Xalan. However, if I make that search using the ApplyXPath sample, then I get a javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: bar". If I change the XML to this: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com" xmlns:bar="http://bar.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> then the search works. In the original XML above, I can search for //foo:Foo, but if I wrap the whole structure in a <baz>...</baz> then the search for fooFoo fails. This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 16:07:46 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 46138 invoked from network); 1 Sep 2008 16:07:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 16:07:46 -0000 Received: (qmail 54429 invoked by uid 500); 1 Sep 2008 16:07:44 -0000 Delivered-To: mjones@example.com Received: (qmail 54402 invoked by uid 500); 1 Sep 2008 16:07:43 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 54391 invoked by uid 99); 1 Sep 2008 16:07:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:07:43 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 16:06:45 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 17A7D234C1B2 for <mjones@example.com>; Mon, 1 Sep 2008 09:06:46 -0700 (PDT) Message-ID: <1600160633.1220285206082.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 09:06:46 -0700 (PDT) From: "Romeu Flores (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANJ-2455) CLONE -XPath ignores namespace declarations except on root element MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org CLONE -XPath ignores namespace declarations except on root element ------------------------------------------------------------------ Key: XALANJ-2455 URL: https://issues.apache.org/jira/browse/XALANJ-2455 Project: XalanJ2 Issue Type: Bug Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: XPath Affects Versions: 2.5Dx Environment: Operating System: Windows NT/2K Platform: PC Reporter: Romeu Flores Assignee: Xalan Developers Mailing List By my reading of the XML standards, this document should be valid: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> and I should be able to search for //bar:Bar using the XPath implementation in Xalan. However, if I make that search using the ApplyXPath sample, then I get a javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: bar". If I change the XML to this: <?xml version="1.0"?> <foo:Foo xmlns:foo="http://foo.com" xmlns:bar="http://bar.com"> <bar:Bar xmlns:bar="http://bar.com"/> </foo:Foo> then the search works. In the original XML above, I can search for //foo:Foo, but if I wrap the whole structure in a <baz>...</baz> then the search for fooFoo fails. This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 16:09:44 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 47602 invoked from network); 1 Sep 2008 16:09:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 16:09:44 -0000 Received: (qmail 58416 invoked by uid 500); 1 Sep 2008 16:09:42 -0000 Delivered-To: mjones@example.com Received: (qmail 58283 invoked by uid 500); 1 Sep 2008 16:09:42 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 58272 invoked by uid 99); 1 Sep 2008 16:09:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:09:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 16:08:43 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 5AC5D234C1C3 for <mjones@example.com>; Mon, 1 Sep 2008 09:08:44 -0700 (PDT) Message-ID: <1300252169.1220285324370.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 09:08:44 -0700 (PDT) From: "Romeu Flores (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Closed: (XALANJ-2455) CLONE -XPath ignores namespace declarations except on root element In-Reply-To: <1600160633.1220285206082.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Romeu Flores closed XALANJ-2455. -------------------------------- Resolution: Invalid sorry. I misused jira > CLONE -XPath ignores namespace declarations except on root element > ------------------------------------------------------------------ > > Key: XALANJ-2455 > URL: https://issues.apache.org/jira/browse/XALANJ-2455 > Project: XalanJ2 > Issue Type: Bug > Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects. Anybody can view the issue.) > Components: XPath > Affects Versions: 2.5Dx > Environment: Operating System: Windows NT/2K > Platform: PC > Reporter: Romeu Flores > Assignee: Xalan Developers Mailing List > > By my reading of the XML standards, this document should be valid: > <?xml version="1.0"?> > <foo:Foo xmlns:foo="http://foo.com"> > <bar:Bar xmlns:bar="http://bar.com"/> > </foo:Foo> > and I should be able to search for //bar:Bar using the XPath implementation in > Xalan. However, if I make that search using the ApplyXPath sample, then I get a > javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: > bar". > If I change the XML to this: > <?xml version="1.0"?> > <foo:Foo xmlns:foo="http://foo.com" > xmlns:bar="http://bar.com"> > <bar:Bar xmlns:bar="http://bar.com"/> > </foo:Foo> > then the search works. In the original XML above, I can search for //foo:Foo, > but if I wrap the whole structure in a <baz>...</baz> then the search for fooFoo > fails. > This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 16:09:45 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 47644 invoked from network); 1 Sep 2008 16:09:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 16:09:45 -0000 Received: (qmail 58482 invoked by uid 500); 1 Sep 2008 16:09:42 -0000 Delivered-To: mjones@example.com Received: (qmail 58449 invoked by uid 500); 1 Sep 2008 16:09:42 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 58406 invoked by uid 99); 1 Sep 2008 16:09:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:09:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 16:08:43 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 5E4FC234C1C4 for <mjones@example.com>; Mon, 1 Sep 2008 09:08:44 -0700 (PDT) Message-ID: <727168863.1220285324385.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 09:08:44 -0700 (PDT) From: "Romeu Flores (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Closed: (XALANJ-2455) CLONE -XPath ignores namespace declarations except on root element In-Reply-To: <1600160633.1220285206082.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Romeu Flores closed XALANJ-2455. -------------------------------- Resolution: Invalid sorry. I misused jira > CLONE -XPath ignores namespace declarations except on root element > ------------------------------------------------------------------ > > Key: XALANJ-2455 > URL: https://issues.apache.org/jira/browse/XALANJ-2455 > Project: XalanJ2 > Issue Type: Bug > Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects. Anybody can view the issue.) > Components: XPath > Affects Versions: 2.5Dx > Environment: Operating System: Windows NT/2K > Platform: PC > Reporter: Romeu Flores > Assignee: Xalan Developers Mailing List > > By my reading of the XML standards, this document should be valid: > <?xml version="1.0"?> > <foo:Foo xmlns:foo="http://foo.com"> > <bar:Bar xmlns:bar="http://bar.com"/> > </foo:Foo> > and I should be able to search for //bar:Bar using the XPath implementation in > Xalan. However, if I make that search using the ApplyXPath sample, then I get a > javax.xml.transformer.Exception saying "Prefix must resolve to a namespace: > bar". > If I change the XML to this: > <?xml version="1.0"?> > <foo:Foo xmlns:foo="http://foo.com" > xmlns:bar="http://bar.com"> > <bar:Bar xmlns:bar="http://bar.com"/> > </foo:Foo> > then the search works. In the original XML above, I can search for //foo:Foo, > but if I wrap the whole structure in a <baz>...</baz> then the search for fooFoo > fails. > This is v2.5.2, BTW. Your menu of versions in Bugzilla doesn't have that one. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 01 16:31:46 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 54710 invoked from network); 1 Sep 2008 16:31:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Sep 2008 16:31:46 -0000 Received: (qmail 75466 invoked by uid 500); 1 Sep 2008 16:31:44 -0000 Delivered-To: mjones@example.com Received: (qmail 75438 invoked by uid 500); 1 Sep 2008 16:31:44 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 75427 invoked by uid 99); 1 Sep 2008 16:31:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 09:31:44 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Sep 2008 16:30:43 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3486E234C1B2 for <mjones@example.com>; Mon, 1 Sep 2008 09:30:44 -0700 (PDT) Message-ID: <1964820626.1220286644199.JavaMail.jira@brutus> Date: Mon, 1 Sep 2008 09:30:44 -0700 (PDT) From: "Romeu Flores (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANJ-2456) XPath ignores namespace declarations except on root element MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org XPath ignores namespace declarations except on root element ----------------------------------------------------------- Key: XALANJ-2456 URL: https://issues.apache.org/jira/browse/XALANJ-2456 Project: XalanJ2 Issue Type: Improvement Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: Xalan, XPath Affects Versions: 2.7.1 Environment: windows Reporter: Romeu Flores Fix For: The Latest Development Code Dear XalanJ2 developers, I work as technical support engineer for Fujitsu Europe Ltd and I have the main role of supporting Fujitsu's software tools. Fujitsu Interstage uses xalan and xpath api internally, and as we benefit of these open source tools, I hope xalan can benefit of our contribution. We were having this problem using xpath queries with namespaces, and though we believed both our query and xml had the correct syntax, we were getting the following error: org.w3c.dom.DOMException: Prefix must resolve to a namespace: ns0 After further investigations, we realised that the method getNamespaceForPrefix of the class PrefixResolverDefault was somewhat not returning namespaces definitions from nodes that were not the root of the xml document. We decided to fix that, and since we got a working version, we decided to submit it back to apache. Having looked at xalanj2's jira, I can see Guy Rixon has had the same problem back in 2004 with version 2.5Dx. I would clone this issue to version 2.7.1, but I realised there was no way of doing that. The reference is: http://issues.apache.org/jira/browse/XALANJ-1790. I can see from this issue these comments from Joe Kesselman: "it does not search the subtree for them (which would be slow, could have conflicts,etc)." And I would like to propose our fix by trying to discuss those arguments. Our solution: our proposed solution is to rewrite the method getNamespaceForPrefix (String). This is the method the xpath api is calling (it does not use getNamespaceForPrefix (String, Node) directly - instead the first method gets the context information using the m_context class member). For the sake of good engineering I chose to mark getNamespaceForPrefix (String, Node) as deprecated, and create the method findNamespaceForPrefix (String, Node), recommending its use instead. I kept the getNamespaceForPrefix (String), but I pointed it to the new method. findNamespaceForPrefix (String, Node) will then perform a search on the xml tree. Being concerned about the performance, I decided to implement an amplitude search, instead of a depth search. The main reason for this is that I still expect the namespace x prefix binding to occur on the top level nodes. It was of course a bit harder to implement and it will be a bit harder to read. On the other hand, any xml that defines its namespaces x prefix bindings on the top level node (root node) will still benefit from the best performance - O(1) to reach the namespace binding. All that said, there should be no slowing down on existing systems. About conflicts: we shouldn't be worried about namespaces conflicts, since the method will return the first namespace it finds for a prefix. It should be a task of the developer to ensure that no prefix maps to more than one namespace. In fact I tested that and an empty string is returned. But from my understanding of w3c documentation, the relation between prefixes and namespaces is: Prefix n:1 Namespace. At least it does not prohibit that. That brings me back to my sample xml: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <soapenv:Body> <ns0:scheduleServiceResponse xmlns="http://util.fel.fujitsu.com" xmlns:ns0="http://util.fel.fujitsu.com"> <ns0:scheduleServiceReturn> <ns1:code xmlns:ns1="http://data.fel.fujitsu.com" >5</ns1:code> <ns2:dateScheduled xmlns:ns2="http://data.fel.fujitsu.com" >2008-10-01T00:01:02.000Z</ns2:dateScheduled> <ns3:description xmlns:ns3="http://data.fel.fujitsu.com" >New opening</ns3:description> <ns4:typeofService xmlns:ns4="http://data.fel.fujitsuooooo.com" > <ns4:code>6</ns4:code> <ns4:description>Moving pictures</ns4:description> </ns4:typeofService> </ns0:scheduleServiceReturn> </ns0:scheduleServiceResponse> </soapenv:Body> </soapenv:Envelope> After the modifications I made, I got the following results for the following xpath expressions: (1) "/soapenv:Envelope/soapenv:Body/ns0:scheduleServiceResponse/ns0:scheduleServiceReturn/ns4:typeofService/ns4:description/text()" Result: Moving pictures (2) "/soapenv:Envelope/soapenv:Body/ns0:scheduleServiceResponse/ns0:scheduleServiceReturn/ns3:description/text()" Result: New opening Which is exactly what I wanted, and perfectly w3c compliant. I am posting attached the modified code for PrefixResolverDefault. I hope it can be of use. I decided to report (actually re-report) this as an improvement instead of a bug because: I am not sure whether it is a bug - perhaps only a lack of compliance. But it still can be seen as a bug... Best regards, Romeu Flores. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Tue Sep 02 17:48:11 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 13204 invoked from network); 2 Sep 2008 17:48:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 2 Sep 2008 17:48:11 -0000 Received: (qmail 68890 invoked by uid 500); 2 Sep 2008 17:48:09 -0000 Delivered-To: mjones@example.com Received: (qmail 68863 invoked by uid 500); 2 Sep 2008 17:48:09 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 68852 invoked by uid 99); 2 Sep 2008 17:48:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 10:48:09 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2008 17:47:13 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3F978234C1BF for <mjones@example.com>; Tue, 2 Sep 2008 10:47:44 -0700 (PDT) Message-ID: <967998442.1220377664246.JavaMail.jira@brutus> Date: Tue, 2 Sep 2008 10:47:44 -0700 (PDT) From: "Christopher Schultz (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Commented: (XALANJ-2453) ClassCastException during transformation In-Reply-To: <220627399.1219934444526.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12627762#action_12627762 ] Christopher Schultz commented on XALANJ-2453: --------------------------------------------- Henry, Thanks for the workaround -- it definitely does work. I have not had a chance to try out Cocoon 2.2, but I will attempt to do so eventually. There are some other problems with the transformer but I don't believe any of them are Xalan's fault. For instance, all of the SVG elements come out with the XML opacity set to "" or "NaN", which means that none of them show :( > ClassCastException during transformation > ---------------------------------------- > > Key: XALANJ-2453 > URL: https://issues.apache.org/jira/browse/XALANJ-2453 > Project: XalanJ2 > Issue Type: Bug > Security Level: No security risk; visible to anyone(Ordinary problems in Xalan projects. Anybody can view the issue.) > Components: transformation > Affects Versions: 2.7.1, 2.7 > Environment: GNU/Linux 2.6 kernel 32-bit, Sun JRE 1.5.0_13, Xalan 2.7.1 and libs included with the Xalan 2.7.1 distro. > Reporter: Christopher Schultz > Attachments: test.svg, VectorConverter-SVG2VML-transformer.zip > > > Using an XSLT found in the VectorConverter 1.2 package to convert an SVG document into a VML document, the following exception is generated. I started out using Cocoon, which provides the full stack trace shown below. The command-line use of Xalan shows a less useful message, which is also included below. I will include an example SVG that fails to transform, and I'll see if I'm permitted to attach the XSLT in question from VectorConverter, or if you'll have to go get it yourselves to reproduce (sorry). > First, the CLI message: > file:///path/to/svg2vml.xsl; Line #114; Column #122; org.apache.xpath.objects.XBooleanStatic > Now, the full stack trace provided by Cocoon: > java.lang.ClassCastException: org.apache.xpath.objects.XBooleanStatic > at org.apache.xpath.axes.FilterExprIteratorSimple.executeFilterExpr(FilterExprIteratorSimple.java:116) > at org.apache.xpath.axes.FilterExprWalker.setRoot(FilterExprWalker.java:131) > at org.apache.xpath.axes.WalkingIterator.setRoot(WalkingIterator.java:157) > at org.apache.xpath.axes.NodeSequence.setRoot(NodeSequence.java:265) > at org.apache.xpath.axes.LocPathIterator.asIterator(LocPathIterator.java:269) > at org.apache.xpath.axes.UnionPathIterator.setRoot(UnionPathIterator.java:80) > at org.apache.xpath.axes.LocPathIterator.asNode(LocPathIterator.java:300) > at org.apache.xpath.axes.LocPathIterator.bool(LocPathIterator.java:320) > at org.apache.xpath.operations.And.bool(And.java:72) > at org.apache.xpath.operations.Or.bool(Or.java:72) > at org.apache.xpath.XPath.bool(XPath.java:412) > at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:126) > at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) > at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) > at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400) > at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270) > at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356) > at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447) > at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408) > at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56) > at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586) > at org.apache.xml.serializer.ToXMLSAXHandler.endDocument(ToXMLSAXHandler.java:183) > at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1367) > at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447) > at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408) > at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56) > at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586) > at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source) > at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source) > at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) > at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315) > at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:334) > at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:326) > at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579) > at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:279) > at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481) > at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:121) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) > at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253) > at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47) > at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143) > at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69) > at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235) > at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177) > at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253) > at org.apache.cocoon.Cocoon.process(Cocoon.java:699) > at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) > at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) > at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) > at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) > at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) > at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) > at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) > at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) > at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) > at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) > at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) > at java.lang.Thread.run(Thread.java:595) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Wed Sep 03 20:24:06 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 53869 invoked from network); 3 Sep 2008 20:24:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Sep 2008 20:24:06 -0000 Received: (qmail 12832 invoked by uid 500); 3 Sep 2008 20:24:03 -0000 Delivered-To: mjones@example.com Received: (qmail 12814 invoked by uid 500); 3 Sep 2008 20:24:03 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 12803 invoked by uid 99); 3 Sep 2008 20:24:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 13:24:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Sep 2008 20:23:13 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 39B2E234C1C3 for <mjones@example.com>; Wed, 3 Sep 2008 13:23:44 -0700 (PDT) Message-ID: <1339294440.1220473424221.JavaMail.jira@brutus> Date: Wed, 3 Sep 2008 13:23:44 -0700 (PDT) From: "Brian Minchau (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Commented: (XALANJ-2419) Astral characters written as a pair of NCRs with the surrogate scalar values when using UTF-8 In-Reply-To: <27307016.1199272114138.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/XALANJ-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628122#action_12628122 ] Brian Minchau commented on XALANJ-2419: --------------------------------------- Henri, Richard: you are right, the code there should have checked if ch was a high in a high low/pair, and m_encodingInfo.isInEncoding(high,low) should have been called in this case. Definite bug. I'll see if I can supply a patch. > Astral characters written as a pair of NCRs with the surrogate scalar values when using UTF-8 > --------------------------------------------------------------------------------------------- > > Key: XALANJ-2419 > URL: https://issues.apache.org/jira/browse/XALANJ-2419 > Project: XalanJ2 > Issue Type: Bug > Components: Serialization > Affects Versions: 2.7.1 > Reporter: Henri Sivonen > > org.apache.xml.serializer.ToStream contains the following code: > else if (m_encodingInfo.isInEncoding(ch)) { > // If the character is in the encoding, and > // not in the normal ASCII range, we also > // just leave it get added on to the clean characters > > } > else { > // This is a fallback plan, we should never get here > // but if the character wasn't previously handled > // (i.e. isn't in the encoding, etc.) then what > // should we do? We choose to write out an entity > writeOutCleanChars(chars, i, lastDirtyCharProcessed); > writer.write("&#"); > writer.write(Integer.toString(ch)); > writer.write(';'); > lastDirtyCharProcessed = i; > } > This leads to the wrong (latter) if branch running for surrogates, because isInEncoding() for UTF-8 returns false for surrogates. It is always wrong (regardless of encoding) to escape a surrogate as an NCR. > The practical effect of this bug is that any document with astral characters in it ends up in an ill-formed serialization and does not parse back using an XML parser. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Mon Sep 08 08:59:31 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 28193 invoked from network); 8 Sep 2008 08:59:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Sep 2008 08:59:31 -0000 Received: (qmail 53244 invoked by uid 500); 8 Sep 2008 08:59:29 -0000 Delivered-To: mjones@example.com Received: (qmail 53034 invoked by uid 500); 8 Sep 2008 08:59:28 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 53023 invoked by uid 99); 8 Sep 2008 08:59:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 01:59:28 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mjones@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO wa-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 08:58:30 +0000 Received: by wa-out-1112.google.com with SMTP id j5so1099417wah.4 for <mjones@example.com>; Mon, 08 Sep 2008 01:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=CzwNTI+69ZBcehxPjCIJJ7p9/MreYHotO/jMiYXlidg=; b=sql1te+tcDzNyr+4NOHOhHA1IQ5XnOchyJb4gSm7LUM+hybQycxQBuQu7Uqx2CAnkg uRWkKA142mKaKEYojOOG+9wVVtV5+/9HZ7F6HAB0YPeg+czGbkO9bLPR3U6KHvUGKz8V krm2b0TfFOJYagvXBjGxKJp9zbaid21aUFwu4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=dAFSiIoWVQXq3fITvexZMFa9wakWq2N4KwnbaGg/0kIUsvUby3iihbx08wEZIAoFrh EwOzTqT6F4p3/rW+2Qwm8B5V8inIGFcQH+jREVrqgYtvGpfnMJHU+5BKPCrZgKoUY4ml 9RDGqXBz19Z9sAOrtgvT8aKXQBJ1eagGrzrmE= Received: by 83.161.120.155 with SMTP id x16mr12122244wae.155.1220864332100; Mon, 08 Sep 2008 01:58:52 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Mon, 8 Sep 2008 01:58:52 -0700 (PDT) Message-ID: <mjones@example.com> Date: Mon, 8 Sep 2008 10:58:52 +0200 From: "Hemligt Namn" <mjones@example.com> To: mjones@example.com Subject: NamedNodeMapAttributeList assertion bug MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_244_29778700.1220864332085" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_244_29778700.1220864332085 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Dear Xalan developers, I believe there is a bug in the NamedNodeMapAttributeList constructor: an assertion fails if the attribute map is empty. The assertion prevents me from serializing this to XML: <page> <paragraph> </paragraph> </page> Please find below excerpts from the relevant source code, a stack trace, a patch, example code that triggers the assertion. (Studying Xalan's SVN history, it seems the bug was introduced in late June, 2008. Also, as far as I've seen, there must be two nested tags with no attributes for the bug to appear. --- Perhaps that's why this has not been fixed before.) Regards, Magnus -------------------------------------------- Excerpt from relevant source code -------------------------------------------- http://svn.apache.org/repos/asf/xalan/c/trunk/src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp NamedNodeMapAttributeList888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList( const XalanNamedNodeMap& theMap, MemoryManagerType& theManager) : ParentType(), m_nodeMap(theMap), m_lastIndex(theMap.getLength() - 1), m_memoryManager(theManager) { assert(theMap.getLength() != 0); <-- fails } trunk\xml-xalan\c\src\xalanc\xmlsupport\formattertreewalker.cpp: FormatterTreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4startNode(const XalanNode* node) : : case XalanNo888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ELEMENT_NODE: { const XalanElement* theElementNode = #if defined(XALAN_OLD_STYLE_CASTS) (const XalanElement*)node; #else static_cast<const XalanElement*>(node); #endif const XalanNamedNodeMap* atts = theElementNode->getAttributes(); assert(atts != 0); NamedNodeMapAttributeList theAttributeList(*atts, m_memoryManager); <--- above assertion means that there *must* be an attribute? m_formatterListener.startElement(c_wstr(theElementNode->getNodeName()), theAttributeList); } break; : : -------------------------------------------- Stack trace -------------------------------------------- msvcr80d.dll!_wassert(const wchar_t * expr=0x095aa254, const wchar_t * filename=0x095aa290, unsigned int lineno=56) Line 384 C Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNamedNodeMap & theMap={...}, xercesc_3_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4MemoryManager & theManager={...}) Line 56 + 0x2e bytes C++ Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4FormatterTreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4startNode(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * node=0x09ff07e8) Line 89 + 0x13 bytes C++ Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4traverse(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * pos=0x09ff07e8, const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * parent=0x09fee6c0) Line 159 + 0x13 bytes C++ Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4traverseSubtree(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * pos=0x09fee6c0) Line 265 C++ my-test-program.exe!XmlPageBuilder_tests888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Xalan_assertion888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4test_method() Line 39 + 0x15 bytes C++ -------------------------------------------- Patch? (Removing assertion, setting index to 0) -------------------------------------------- Index: NamedNodeMapAttributeList.cpp =================================================================== --- NamedNodeMapAttributeList.cpp (revision 679080) +++ NamedNodeMapAttributeList.cpp (working copy) @@ -50,10 +50,10 @@ MemoryManagerType& theManager) : ParentType(), m_nodeMap(theMap), - m_lastIndex(theMap.getLength() - 1), + m_lastIndex(theMap.getLength() > 0 ? theMap.getLength() - 1 : 0), m_memoryManager(theManager) { - assert(theMap.getLength() != 0); + //assert(theMap.getLength() != 0); -- no, allow 0 } -------------------------------------------- Example code that reproduces the crash -------------------------------------------- XalanTransformer oXalanTransformer; XalanDocumentBuilder* pBuilder = oXalanTransformer.createDocumentBuilder(); ContentHandler* pContentHandler = pBuilder->getContentHandler(); AttributesImpl xAttributes; const XalanDOMChar xNullChar = 0; pContentHandler->startDocument(); pContentHandler->startElement( & xNullChar, & xNullChar, L"page", xAttributes ); pContentHandler->startElement( & xNullChar, & xNullChar, L"paragraph", xAttributes ); // nested tag required for assertion to fail pContentHandler->endElement( & xNullChar, & xNullChar, L"paragraph" ); pContentHandler->endElement( & xNullChar, & xNullChar, L"page" ); pContentHandler->endDocument(); _STL888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4stringstream sstream; XalanStdOutputStream xStream( sstream ); XalanOutputStreamPrintWriter xPrintWriter( xStream ); FormatterToXML xFormatter( xPrintWriter ); FormatterTreeWalker oTreeWalker( xFormatter ); const XalanNode* const pFunctionNode = pBuilder->getDocument()->getFirstChild(); xFormatter.setShouldWriteXMLHeader(false); xFormatter.startDocument(); // (required) oTreeWalker.traverseSubtree( pFunctionNode ); xFormatter.endDocument(); ------=_Part_244_29778700.1220864332085 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr">Dear Xalan developers,<br><br>I believe there is a bug in the NamedNodeMapAttributeList constructor: an assertion fails if the attribute map is empty.<br><br>The assertion prevents me from serializing this to XML:<br> &lt;page&gt;<br>&nbsp; &lt;paragraph&gt;<br>&nbsp; &lt;/paragraph&gt;<br>&lt;/page&gt;<br><br>Please find below excerpts from the relevant source code, a stack trace, a patch, example code that triggers the assertion.<br><br>(Studying Xalan&#39;s SVN history, it seems the bug was introduced in late June, 2008. Also, as far as I&#39;ve seen, there must be two nested tags with no attributes for the bug to appear. --- Perhaps that&#39;s why this has not been fixed before.)<br> <br>Regards,<br>Magnus<br><br><br>--------------------------------------------<br>Excerpt from relevant source code<br>--------------------------------------------<br><br><a href="http://svn.apache.org/repos/asf/xalan/c/trunk/src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp">http://svn.apache.org/repos/asf/xalan/c/trunk/src/xalanc/PlatformSupport/NamedNodeMapAttributeList.cpp</a><br> <br>NamedNodeMapAttributeList888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const XalanNamedNodeMap&amp;&nbsp;&nbsp;&nbsp; theMap,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; MemoryManagerType&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theManager) :<br>&nbsp;&nbsp;&nbsp; ParentType(),<br>&nbsp;&nbsp;&nbsp; m_nodeMap(theMap),<br> &nbsp;&nbsp;&nbsp; m_lastIndex(theMap.getLength() - 1),<br>&nbsp;&nbsp;&nbsp; m_memoryManager(theManager)<br>{<br>&nbsp;&nbsp;&nbsp; assert(theMap.getLength() != 0);&nbsp; &lt;-- fails<br>}<br><br><br>trunk\xml-xalan\c\src\xalanc\xmlsupport\formattertreewalker.cpp:<br><br> FormatterTreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4startNode(const XalanNode*&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; node)<br>&nbsp;&nbsp;&nbsp; :<br>&nbsp;&nbsp;&nbsp; :<br>&nbsp;&nbsp;&nbsp; case XalanNo888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4ELEMENT_NODE:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const XalanElement*&nbsp;&nbsp;&nbsp; theElementNode =<br>#if defined(XALAN_OLD_STYLE_CASTS)<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (const XalanElement*)node;<br>#else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; static_cast&lt;const XalanElement*&gt;(node);<br>#endif<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const XalanNamedNodeMap*&nbsp;&nbsp;&nbsp; atts = theElementNode-&gt;getAttributes();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; assert(atts != 0);<br> <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; NamedNodeMapAttributeList&nbsp;&nbsp;&nbsp; theAttributeList(*atts, m_memoryManager);&nbsp; &lt;--- above assertion means that there *must* be an attribute?<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_formatterListener.startElement(c_wstr(theElementNode-&gt;getNodeName()),<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;theAttributeList);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; :<br>&nbsp;&nbsp;&nbsp; :<br><br>--------------------------------------------<br>Stack trace<br>--------------------------------------------<br> <br>msvcr80d.dll!_wassert(const wchar_t * expr=0x095aa254, const wchar_t * filename=0x095aa290, unsigned int lineno=56)&nbsp; Line 384&nbsp;&nbsp;&nbsp; C<br>Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4NamedNodeMapAttributeList(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNamedNodeMap &amp; theMap={...}, xercesc_3_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4MemoryManager &amp; theManager={...})&nbsp; Line 56 + 0x2e bytes&nbsp;&nbsp;&nbsp; C++<br> Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4FormatterTreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4startNode(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * node=0x09ff07e8)&nbsp; Line 89 + 0x13 bytes&nbsp;&nbsp;&nbsp; C++<br>Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4traverse(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * pos=0x09ff07e8, const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * parent=0x09fee6c0)&nbsp; Line 159 + 0x13 bytes&nbsp;&nbsp;&nbsp; C++<br> Xalan-C_1_10D.dll!xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4TreeWalker888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4traverseSubtree(const xalanc_1_888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4XalanNode * pos=0x09fee6c0)&nbsp; Line 265&nbsp;&nbsp;&nbsp; C++<br>my-test-program.exe!XmlPageBuilder_tests888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4Xalan_assertion888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4test_method()&nbsp; Line 39 + 0x15 bytes&nbsp;&nbsp;&nbsp; C++<br> <br>--------------------------------------------<br>Patch? (Removing assertion, setting index to 0)<br>--------------------------------------------<br>Index: NamedNodeMapAttributeList.cpp<br>===================================================================<br> --- NamedNodeMapAttributeList.cpp&nbsp;&nbsp;&nbsp; (revision 679080)<br>+++ NamedNodeMapAttributeList.cpp&nbsp;&nbsp;&nbsp; (working copy)<br>@@ -50,10 +50,10 @@<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MemoryManagerType&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theManager) :<br>&nbsp;&nbsp;&nbsp;&nbsp; ParentType(),<br>&nbsp;&nbsp;&nbsp;&nbsp; m_nodeMap(theMap),<br> -&nbsp;&nbsp;&nbsp; m_lastIndex(theMap.getLength() - 1),<br>+&nbsp;&nbsp;&nbsp; m_lastIndex(theMap.getLength() &gt; 0 ? theMap.getLength() - 1 : 0),<br>&nbsp;&nbsp;&nbsp;&nbsp; m_memoryManager(theManager)<br>&nbsp;{<br>-&nbsp;&nbsp;&nbsp; assert(theMap.getLength() != 0);<br>+&nbsp;&nbsp;&nbsp; //assert(theMap.getLength() != 0); -- no, allow 0<br> &nbsp;}<br><br><br>--------------------------------------------<br>Example code that reproduces the crash<br>--------------------------------------------<br><br>XalanTransformer oXalanTransformer;<br>XalanDocumentBuilder* pBuilder = oXalanTransformer.createDocumentBuilder();<br> ContentHandler* pContentHandler = pBuilder-&gt;getContentHandler();<br><br>AttributesImpl xAttributes;<br>const XalanDOMChar xNullChar = 0;<br><br>pContentHandler-&gt;startDocument();<br>pContentHandler-&gt;startElement( &amp; xNullChar, &amp; xNullChar, L&quot;page&quot;, xAttributes );<br> pContentHandler-&gt;startElement( &amp; xNullChar, &amp; xNullChar, L&quot;paragraph&quot;, xAttributes ); // nested tag required for assertion to fail<br>pContentHandler-&gt;endElement( &amp; xNullChar, &amp; xNullChar, L&quot;paragraph&quot; );<br> pContentHandler-&gt;endElement( &amp; xNullChar, &amp; xNullChar, L&quot;page&quot; );<br>pContentHandler-&gt;endDocument();<br><br>_STL888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4stringstream sstream;<br>XalanStdOutputStream xStream( sstream );<br>XalanOutputStreamPrintWriter xPrintWriter( xStream );<br> FormatterToXML xFormatter( xPrintWriter );<br>FormatterTreeWalker oTreeWalker( xFormatter );<br><br>const XalanNode* const&nbsp;&nbsp;&nbsp; pFunctionNode = pBuilder-&gt;getDocument()-&gt;getFirstChild();<br><br>xFormatter.setShouldWriteXMLHeader(false);<br> xFormatter.startDocument(); // (required)<br>oTreeWalker.traverseSubtree( pFunctionNode );<br>xFormatter.endDocument();<br><br><br></div> ------=_Part_244_29778700.1220864332085-- From xalanmjones@example.com Mon Sep 08 20:45:59 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 892 invoked from network); 8 Sep 2008 20:45:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 8 Sep 2008 20:45:59 -0000 Received: (qmail 55059 invoked by uid 500); 8 Sep 2008 20:45:48 -0000 Delivered-To: mjones@example.com Received: (qmail 55011 invoked by uid 500); 8 Sep 2008 20:45:48 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 54909 invoked by uid 99); 8 Sep 2008 20:45:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 13:45:47 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO minotaur.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Sep 2008 20:44:58 +0000 Received: (qmail 541 invoked from network); 8 Sep 2008 20:45:29 -0000 Received: from localhost (HELO ?IPv888a:dbb7:2d49:b3f6:8605:bf4e:caed:e5a4:1?) (83.161.120.155) by localhost with SMTP; 8 Sep 2008 20:45:29 -0000 Message-ID: <mjones@example.com> Date: Mon, 08 Sep 2008 13:45:23 -0700 From: David Bertoni <mjones@example.com> User-Agent: Thunderbird 83.161.120.155 (Windows/20080708) MIME-Version: 1.0 To: mjones@example.com Subject: Re: NamedNodeMapAttributeList assertion bug References: <mjones@example.com> In-Reply-To: <mjones@example.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hemligt Namn wrote: > Dear Xalan developers, > > I believe there is a bug in the NamedNodeMapAttributeList constructor: > an assertion fails if the attribute map is empty. > > The assertion prevents me from serializing this to XML: > <page> > <paragraph> > </paragraph> > </page> > > Please find below excerpts from the relevant source code, a stack trace, > a patch, example code that triggers the assertion. I put the assertion in because the rest of the logic will fail if the attribute list is empty. I think I need to just fix the other logic. Can you open a Jira issue a attach an archive with the necessary inputs to reproduce the problem? Dave --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Wed Sep 10 00:10:35 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 31033 invoked from network); 10 Sep 2008 00:10:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2008 00:10:35 -0000 Received: (qmail 62865 invoked by uid 500); 10 Sep 2008 00:10:32 -0000 Delivered-To: mjones@example.com Received: (qmail 62836 invoked by uid 500); 10 Sep 2008 00:10:32 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 62825 invoked by uid 99); 10 Sep 2008 00:10:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 17:10:32 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 00:09:42 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 6CE8A234C1CA for <mjones@example.com>; Tue, 9 Sep 2008 17:09:44 -0700 (PDT) Message-ID: <765554955.1221005384431.JavaMail.jira@brutus> Date: Tue, 9 Sep 2008 17:09:44 -0700 (PDT) From: "David Bertoni (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANC-681) NamedNodeMapAttributeList constructor asserts when the provided NamedNodeMap is empty MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org NamedNodeMapAttributeList constructor asserts when the provided NamedNodeMap is empty ------------------------------------------------------------------------------------- Key: XALANC-681 URL: https://issues.apache.org/jira/browse/XALANC-681 Project: XalanC Issue Type: Bug Components: XalanC Affects Versions: CurrentCVS Reporter: David Bertoni Assignee: David Bertoni NamedNodeMapAttributeList is not designed to work properly with an empty NamedNodeMap. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: mjones@example.com For additional commands, e-mail: mjones@example.com From xalanmjones@example.com Wed Sep 10 09:07:13 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 71625 invoked from network); 10 Sep 2008 09:07:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2008 09:07:13 -0000 Received: (qmail 9432 invoked by uid 500); 10 Sep 2008 09:07:10 -0000 Delivered-To: mjones@example.com Received: (qmail 9401 invoked by uid 500); 10 Sep 2008 09:07:10 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 9390 invoked by uid 99); 10 Sep 2008 09:07:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 02:07:10 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mjones@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO py-out-1112.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 09:06:12 +0000 Received: by py-out-1112.google.com with SMTP id z74so1627610pyg.9 for <mjones@example.com>; Wed, 10 Sep 2008 02:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=RdFZgSJaF1fQg5+UwCotDYKR+ibyTmyWGXzmbgNhLpo=; b=CIYXeHk8I9QWt1nljYfURhcBk5GU1KP6hWH56YJR7yhe3TckqG1YuhdMIkkqhNc3ut HgUdY25qmLSwnzAGog5jRqTptIrLGmxQj9G7FyrcBb+jjmM6NV4PCP0f4NQsh3m5u5bj ZKeHgEpf8ndf2doSKLz+XmKX3Dhu5zG/bGIAM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=rBxc6lnt30vo2fRcmS7KHWwPjJ/20jOcLV70PGBDkjAAq0ZeTy5Tu4Iiu7tlqz6Udw 0t8LxtvLustMeaPzgrDDWnHoSoVUd6u8FdZItc0TNfaVSL67aNmkd1jDuLfhxZB/4iTJ G+BG71441/nLsyTZEHCg4Ye4J04E4aUHN5+I0= Received: by 83.161.120.155 with SMTP id j9mr323425wff.277.1221037586261; Wed, 10 Sep 2008 02:06:26 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 10 Sep 2008 02:06:26 -0700 (PDT) Message-ID: <mjones@example.com> Date: Wed, 10 Sep 2008 11:06:26 +0200 From: "Hemligt Namn" <mjones@example.com> To: mjones@example.com Subject: Re: NamedNodeMapAttributeList assertion bug In-Reply-To: <mjones@example.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20430_33484817.1221037586260" References: <mjones@example.com> <mjones@example.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_20430_33484817.1221037586260 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Dave, Thanks for opening a Jira issue and providing a patch that quickly. (I otherwise intended to open an issue today.) (In case I should upload some of the original information (steps to reproduce?), just let me know.) Regards, Magnus On Mon, Sep 8, 2008 at 10:45 PM, David Bertoni <mjones@example.com> wrote: > Hemligt Namn wrote: > >> Dear Xalan developers, >> >> I believe there is a bug in the NamedNodeMapAttributeList constructor: an >> assertion fails if the attribute map is empty. >> >> The assertion prevents me from serializing this to XML: >> <page> >> <paragraph> >> </paragraph> >> </page> >> >> Please find below excerpts from the relevant source code, a stack trace, a >> patch, example code that triggers the assertion. >> > I put the assertion in because the rest of the logic will fail if the > attribute list is empty. I think I need to just fix the other logic. > > Can you open a Jira issue a attach an archive with the necessary inputs to > reproduce the problem? > > Dave > ------=_Part_20430_33484817.1221037586260 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr">Hi Dave,<br><br>Thanks for opening a Jira issue and providing a patch that quickly.<br><br>(I otherwise intended to open an issue today.)<br>(In case I should upload some of the original information (steps to reproduce?), just let me know.)<br> <br>Regards,<br>Magnus<br><br><div class="gmail_quote">On Mon, Sep 8, 2008 at 10:45 PM, David Bertoni <span dir="ltr">&lt;<a href="mailto:mjones@example.com">mjones@example.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div class="Ih2E3d">Hemligt Namn wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Dear Xalan developers,<br> <br> I believe there is a bug in the NamedNodeMapAttributeList constructor: an assertion fails if the attribute map is empty.<br> <br> The assertion prevents me from serializing this to XML:<br> &lt;page&gt;<br> &nbsp;&lt;paragraph&gt;<br> &nbsp;&lt;/paragraph&gt;<br> &lt;/page&gt;<br> <br> Please find below excerpts from the relevant source code, a stack trace, a patch, example code that triggers the assertion.<br> </blockquote></div> I put the assertion in because the rest of the logic will fail if the attribute list is empty. &nbsp;I think I need to just fix the other logic.<br> <br> Can you open a Jira issue a attach an archive with the necessary inputs to reproduce the problem?<br> <br> Dave<br></blockquote></div><br></div> ------=_Part_20430_33484817.1221037586260-- From xalanmjones@example.com Wed Sep 10 15:23:07 2008 Return-Path: <xalanmjones@example.com> Delivered-To: mjones@example.com Received: (qmail 11876 invoked from network); 10 Sep 2008 15:23:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 10 Sep 2008 15:23:07 -0000 Received: (qmail 26533 invoked by uid 500); 10 Sep 2008 15:23:04 -0000 Delivered-To: mjones@example.com Received: (qmail 26328 invoked by uid 500); 10 Sep 2008 15:23:03 -0000 Mailing-List: contact mjones@example.com; run by ezmlm Precedence: bulk list-help: <mailto:mjones@example.com> list-unsubscribe: <mailto:mjones@example.com> List-Post: <mailto:mjones@example.com> Reply-To: mjones@example.com List-Id: <xalan-dev.xml.apache.org> Delivered-To: mailing list mjones@example.com Received: (qmail 26317 invoked by uid 99); 10 Sep 2008 15:23:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 08:23:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 15:22:12 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 654A9234C1D7 for <mjones@example.com>; Wed, 10 Sep 2008 08:22:44 -0700 (PDT) Message-ID: <1246001294.1221060164413.JavaMail.jira@brutus> Date: Wed, 10 Sep 2008 08:22:44 -0700 (PDT) From: "Jeffrey Barrus (JIRA)" <mjones@example.com> To: mjones@example.com Subject: [jira] Created: (XALANJ-2457) xsl:number fails when count item is doubly nested and end tag is on same line MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org xsl:number fails when count item is doubly nested and end tag is on same line ----------------------------------------------------------------------------- Key: XALANJ-2457 URL: https://issues.apache.org/jira/browse/XALANJ-2457 Project: XalanJ2 Issue Type: Bug Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.) Components: Xalan Affects Versions: 2.7.1 Environment: WinXP, testing with xalanj in custom java as well as in Oxygen 9 Reporter: Jeffrey Barrus test case: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="top"> <xsl:apply-templates/> </xsl:template> <xsl:template match="middle"> <xsl:number format="1" from="top" level="any" count="bottom"/> </xsl:template> </xsl:stylesheet> <?xml version="1.0" encoding="UTF-8"?> <top> <middle> <test><bottom/><bottom/></test> </middle> <middle/> </top> The output is correctly 0 2 However, if the xml is changed so that the
{'source': 'Apache Software Foundation Public Mail Archives'}