You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Juan Jose Pablos <ch...@che-che.com> on 2003/09/15 02:17:31 UTC
URLEncoder on IdGeneratorTransformer procuces invalid document xml
Hi,
I have been digging for this error:
/var/tmp/fs/build/site/samples/ihtml-sample.xml:4:143: Attribute value
"Test+iHTML+page" of type ID must be a name.
On /forrest.xmap/ we use /idgen/ tranform to produce id for sections title:
<map:generate src="content/xdocs/{1}.ihtml" type="html" />
<map:transform src="resources/stylesheets/html2document.xsl" />
<map:transform type="idgen" />
<map:serialize type="xml-document"/>
On /IdGeneratorTransformer.java/ we use URLEncoder.encode and that
transform spaces to a a plus sign "+".
Index:
src/java/components/org/apache/cocoon/transformation/IdGeneratorTransformer.java
===================================================================
RCS file:
/home/cvs/xml-forrest/src/java/components/org/apache/cocoon/transformation/IdGeneratorTransformer.java,v
retrieving revision 1.6
diff -r1.6 IdGeneratorTransformer.java
220c220,221
< String newId = URLEncoder.encode(id);
---
> //FIXME: + produces an error on document schema
> String newId = URLEncoder.encode(id);
So in other to fix this issue we can:
- Modify DTD and change a ID attribute for DATA attribute.
- FIX on IdGeneratorTransformer.java and remove spaces on the id.
-Ignore as this is just a tranformation to a intermediate xml format.
Say something.
Cheers,
Cheche