forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Jose Pablos <che...@che-che.com>
Subject URLEncoder on IdGeneratorTransformer procuces invalid document xml
Date Mon, 15 Sep 2003 00:17:31 GMT
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


Mime
View raw message