cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Grant <>
Subject XSP serverpages generator: entities within element attributes are being resolved.
Date Thu, 31 Jan 2002 17:25:32 GMT


I am encountering a problem when applying the serverpages generator to files 
which contain XML elements that have attributes which contain entity 

The serverpages generator is failing during compilation, because Cocoon is 
resolving entity references, INCLUDING those within elements outside of the 
xsp namespace, and specifically entity references within attributes of those 

I understand this may be "normal" since the file is processed by a SAX parser 
inside Cocoon, but it seems like there ought to be a way to override the 
resolution for entities within elements outside of the XSP namespace when 
using the serverpages generator.  I've looked around a lot, read all the 
docs.  Maybe I missed it.


<xsp:... blah blah>

	<THING foo="100" data="string of &quot; characters"/>
	<THING foo="101" data="another &nbsp; string thing"/>


This is handled by something standard like:

	<map:match pattern="stuff/**.xml">
   		<map:generate type="serverpages" src="stuff/{1}.xml"/>
		<map:transform src="style/stuff.xsl"/>
		<map:serialize type="html"/>

And produces, in the work directory, java sourcecode output like this:

	xspAttr.addAttribute("", "foo", "foo", "CDATA", "string of " characters");

Which the compiler chokes on due to the mismatched quote characters. 

Any thoughts on ways around this, aside from resorting to putting everything 
in distinct elements, would be most appreciated.  

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message