cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: XSP serverpages generator: entities within element attributes are being resolved.
Date Sat, 02 Mar 2002 18:16:10 GMT
Try the following work around:

<THING foo="100">
<xsp:attribute name="data">string of " characters</xsp:attribute>
</THING>

Vadim

> From: Benjamin Grant [mailto:bgrant@salon.com]
> 
> Hello,
> 
> I am encountering a problem when applying the serverpages generator to
files
> which contain XML elements that have attributes which contain entity
> references.
> 
> 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
> elements.
> 
> 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.
> 
> 
> Sample:
> 
> <xsp:... blah blah>
> 
> <page>
> 	<STUFF>
> 	<THING foo="100" data="string of &quot; characters"/>
> 	<THING foo="101" data="another &nbsp; string thing"/>
> 	</STUFF>
> </page>
> 
> </xsp...>
> 
> 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"/>
> 	</map:match>
> 
> 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. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message