cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <j.heini...@ewerk.com>
Subject Re: [Flow] Importing multiple scripts? (ScriptDirectoryNode)
Date Tue, 24 Feb 2004 13:59:38 GMT
Bertrand Delacretaz <bdelacretaz <at> apache.org> writes:

> 
> Le Mardi, 24 fév 2004, à 13:12 Europe/Zurich, Andreas Hartmann a écrit :
> > ...I would use CInclude. I'll try if it includes text files
> > and complain if it doesn't work :)
> 
> Note that there are at least two ways to "XMLize" text files:

At least the XInclude spec knows an "include text" mode. It seems our our
implementation suports it:

if (parse.equals("text")) {
  getLogger().debug("Parse type is text");
  InputStream input = url.getInputStream();
  Reader reader = new BufferedReader(new InputStreamReader(input));
  int read;
  char ary[] = new char[1024];
  if (reader != null) {
    while ((read = reader.read(ary)) != -1) {
      super.characters(ary,0,read);
    }
    reader.close();
  }
} else if (parse.equals("xml")) {
  ...
}

This would make a text parser superfluous.

And what about CInclude? Does it also know a text mode?

Joerg


Mime
View raw message