cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "julien bloit" <Julien.Bl...@ircam.fr>
Subject xsp : create xml from Array
Date Tue, 11 May 2004 10:54:32 GMT
Hi,
I guess this is a very simple question, but I somehow can't get it working :

I need to create a very simple xml tree from an Array object :

<xsp:logic>
       String labels = <esql:get-string column="Type"/>;
       int i = labels.indexOf('(');
       int f = labels.indexOf(')');
       labels = labels.substring(i+1,f);
       labels = labels.replaceAll("'","");
       String[] labelTab = labels.split(",");
       int longueur = labelTab.length;

        <!-- this doesn't seem to work : -->
       DocumentFragment myLabels = <xsp:element name="labels"/>;
        ...
</xsp:logic>
...

Basically, I just need to create a container element which I can manipulate
later with DOM API to add childs etc...

Here's the error :
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
show_enum_xsp: ERROR 1
(org\apache\cocoon\www\dvdcarte\tests\show_enum_xsp.java): ... labels =
labels.replaceAll("'",""); String[] labelTab = labels.split(","); String un
= labelTab[0]; int longueur = labelTab.length; // start error (lines
426-426) "DocumentFragment cannot be resolved or is not a type"
DocumentFragment myLabels = // end error this.contentHandler.startElement(
"", "labels", ... Line 426, column 0: DocumentFragment cannot be resolved or
is not a type





Thanks for your help!

Julien




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


Mime
View raw message