OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Fw: [xml-dev] Which latest and greatest XML Standards Should I UseFor XML-Grammar-Fortune?

Hi Dimitre,

Forwarding to the list. Next time, please hit reply-to-all. It is not my fault
that GMail makes it too easy to reply to a single recipient and also hides my
signature where I specifically request people to reply to list.


	Shlomi Fish 

Begin forwarded message:

Date: Sat, 17 Nov 2012 07:25:44 -0800
From: Dimitre Novatchev <dnovatchev@gmail.com>
To: Shlomi Fish <shlomif@shlomifish.org>
Subject: Re: [xml-dev] Which latest and greatest XML Standards Should I Use For

On Tue, Nov 13, 2012 at 10:45 AM, Shlomi Fish <shlomif@shlomifish.org> wrote:
> 3. I have defined well-formed plaintext grammars for XML-Grammar-Fiction and
> XML-Grammar-Screenplay (see the above link), which gets translated to the
> custom XML grammars (and from there to other XMLs using XSLT), and I wonder
> whether I can do the same for XML-Grammar-Fortune. Is there a good tool for
> doing something like that with ease?

More than four years ago I wrote  in pure XSLT 2.0 a general LR-1
parser. It is table-driven. The parsing tables are generated with
YACC, modified to output them as XML.

Whenever a rule is recognized (a reduction needs to be prformed), the
parser invokes a corresponding (xsl:) function, that has been provided
to it as a parameter (XSLT 2.0 doesn't formally allow this, but this
is done using FXSL (again written in pure XSLT 2.0).

Therefore, one has to write the fonctions that the parser calls on
each rule recognition) and these functions may generate anything that
is desired (so, why not XSD?).

> 4. Should I use XSLT 2.0 and/or XPath 2.0? Right now I prefer to use Perl 5
> with the XML::LibXSLT CPAN module that is in turn based on libxslt from the
> GNOME project, and from what I know, the only full open-source XSLT 2.0
> implementation is Saxon, which is written in Java. There's
> https://metacpan.org/module/Inline::Java but it may not work well (have not
> tried).

XSLT 2.0 is a gigantic leap forward from XSLT 1.0. The afore-mentioned
parser is written in 200-300 lines of XSLT 2.0 and is readable and
maintainable. If the same code was written in XSLT 1.0, it would
require around five times more code and would present a formidable
readability and maintainability issue.

Dimitre Novatchev
Truly great madness cannot be achieved without significant intelligence.
To invent, you need a good imagination and a pile of junk
Never fight an inanimate object
To avoid situations in which you might make mistakes may be the
biggest mistake of all
Quality means doing it right when no one is looking.
You've achieved success in your field when you don't know whether what
you're doing is work or play
Facts do not cease to exist because they are ignored.
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
I finally figured out the only reason to be alive is to enjoy it.

Shlomi Fish       http://www.shlomifish.org/
Stop Using MSIE - http://www.shlomifish.org/no-ie/

You can never truly appreciate The Gilmore Girls until you’ve watched it in
the original Klingon.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS