DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23516>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23516 Default namespace in xscript produces error - Element or attribute do not match QName production: QName::=(NCName':')?NCName Summary: Default namespace in xscript produces error - Element or attribute do not match QName production: QName::=(NCName':')?NCName Product: Cocoon 2 Version: 2.1 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: core AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] When you try to use value of xscript variable in xsp, which has default namespace declaration, it crashes with the following error: Element or attribute do not match QName production: QName::=(NCName':')?NCName This code works: ... <xscript:variable name="test-xml"> <bla-bla:test xmlns:bla-bla="urn:some-url">!!!</ bla-bla:test> </xscript:variable> <xscript:get name="test-xml" /> ... , and this one doesn't: ... <xscript:variable name="test-xml"> <test xmlns="urn:some-url">!!!</test> </xscript:variable> <xscript:get name="test-xml" /> ... Possible reason could be in usage of org.apache.cocoon.components.xscript.StringBufferContentHandler, which is not being used anywhere else and looks like obsolete (not deprecated). It handles "xmlns:*" attributes in some special way, but not "xmlns". Here is relevant stack trace: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName. at org.apache.xerces.util.ErrorHandlerWrapper. createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper. fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter. reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter. reportError(Unknown Source) at org.apache.xerces.impl.XMLEntityScanner. scanQName(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl. scanAttribute(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl. scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher. scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl $FragmentContentDispatcher.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.DTDConfiguration. parse(Unknown Source) at org.apache.xerces.parsers.XMLParser. parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser. parse(Unknown Source) at org.apache.excalibur.xml.impl.JaxpParser. parse(JaxpParser.java:318) at org.apache.excalibur.xml.impl.JaxpParser. parse(JaxpParser.java:337) at org.apache.cocoon.components.xscript.XScriptObject. toSAX(XScriptObject.java:163) at org.apache.cocoon.components.xscript.XScriptObject. toEmbeddedSAX(XScript Object.java:153) at org.apache.cocoon.www.samples.soap.pages.test_xsp. generate(org.apache.cocoon.www.samples.soap.pages.test_xsp:181) at org.apache.cocoon.generation.ServerPagesGenerator. generate(ServerPagesGenerator.java:260)
