cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Answer <A.Nuzh...@ftc.ru>
Subject Re: text parser
Date Wed, 13 Feb 2002 10:54:33 GMT
Hello Stephan,

  is a good idea! Now i converting many text documents to XML by using
  PHP scripts offline...
  Some names for your parser: txt2xml (simply and clear),
  JTF (Java Text Formatter), JTC (Java Text Converter).
  Also look at the APTConvert
  (http://www.xmlmind.com/aptconvert/distrib/docs/userguidetoc.html),
  may be this tool can help you.
  I think what your parser can be used for converting virtually ANY types of text
  files by using some modification of XSL: i.e. your parser can use
  XML-based stylesheets for transforming text files into XML.
  Examples of text:
  [
     First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph.
     Second paragraph.
  ] OR [
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph.

Second paragraph.
  ]
  Examples of convert rules:
  [
 <xsl:template match="enter()+5*space()">
  <p><xsl:value-of select="."/></p>
 </xsl:template>
  ] OR [
 <xsl:template match="2*enter()">
  <p><xsl:value-of select="."/></p>
 </xsl:template>
  ]
  Probably, it's can't work, but i will think deeply about this next time...
  May be, in stylesheets parser must use even SGML instead of XML...

  What is your opinion?

  P.S. Anybody use PHPGenerator under C2? Please help me to switch this
  feature...
  
>*************Original message*************
> From: Stephan Michels <stephan@vern.chem.tu-berlin.de>
> To: cocoon-dev@xml.apache.org <cocoon-dev@xml.apache.org>
> Date: Wednesday, February 13, 2002, 3:37:04 PM
> Subject: text parser (was: schedule/batch feature inside cocoon)


> On Wed, 13 Feb 2002, Bertrand Delacretaz wrote:

>> On Wednesday 13 February 2002 08:23, Lars Steiger wrote:
>> >. . .
>> > simple xml. the parser is a generator. i call it
>> > SimpleTextParserGenerator. it needs an xml configuration fьr parsing
>> > a text stream. the xml configuration defines which text fragment goes
>> > under which xml node.
>> >. . .
>> Changing topics, but are you parsing "structured text" a la PHPwiki or
>> something? I've been thinking for a while (but didn't find time to do
>> it yet) that this would be a nice addition to Cocoon, being able to use
>> structured text as input.

> Hi,

> I had the same idea. I used the time to write a LALR(1)
> Parser like yacc and Regex Scanner like lex. This project is near to be
> finished.
> This parser used xml for all input(grammar) and output(parser table
> generation process)

> One thing that keep me off to publish this project under sf, is that I
> havn't a name for this project.

> A text parser generator and a fragment text parser generator s also
> written.

> If anyone has a suggestion for name? Please help me!

> Thanx, Stephan Michels.


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

>*************Original message*************
Best regards,
  Andrew Answer               A.Nuzhdov@ftc.ru


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


Mime
View raw message