XML for Coders (XFC)

Discussion in 'XML' started by Erik Unger, Dec 17, 2003.

  1. Erik Unger

    Erik Unger Guest

    Don't know how many other proposals like that are
    circulating on the web - if anybody cares: this is mine :)

    If some of you like it, i'll write a SAX parser and a converter!



    ?processingInstruction( text )

    ?xml(version="1.0")

    elementName(attributeName="text" otherAttributeName='5')
    {
    subElementName(){} // should allow to remove empty () ?
    // emptyElement{} // we also could remove empty {} and terminate with ';'
    // emptyElement;
    // emptyElement(attrib="");
    "text"
    'text: "Hello World!"'
    }


    // Single-line comment
    /*
    Multi-line comment
    */

    ![CDATA([ Some CDATA ])]

    !DOCTYPE(greeting SYSTEM "hello.dtd")

    !DOCTYPE( greeting [
    !ELEMENT( greeting (#PCDATA))
    ])


    !ENTITY(myEnt "x") // should we support entities ???

    //Simple replacement for external entities:
    [URI]

    element(attrib="1<2")
    {
    "No special handling of '<>&%^'!"
    }


    NameSpace:element(AttributeNamespace:atrib="text"){}

    html(xmlns='http://www.w3.org/TR/REC-html40')
    {
    head()
    {
    title(){"Page Title"}
    }
    body()
    {
    p(){ "Go " a(href='http://www.bouncingbytes.at'){"here"} }
    }
    }
    Erik Unger, Dec 17, 2003
    #1
    1. Advertising

  2. Erik Unger

    arachno Guest

    hehe. looks fancy ;)
    but probably only c++-syntax supportes will like it ;)
    arachno, Dec 17, 2003
    #2
    1. Advertising

  3. It's all a bit like terse xml, except that yours is quite verbose for no good
    reason that i can determine. You are just swapping one, verbose, syntax for
    another.

    How about this...

    ?text

    elementName attributeName=text otherAttributeName=5
    {
    subElementName
    "text"
    }

    html xmlns=http://www.w3.org/TR/REC-html40
    {
    head
    {
    title attribute='this needs to be in quotes' {"Page Title"}
    }
    !comment
    body
    {
    p{ "Go " a href=http://www.bouncingbytes.at {"here"} }
    }
    }

    I'm sure you can see the syntax and it is less 'just looks like C++/Java' that
    people might find off putting. The purpose of a new version of xml is, surely,
    to provide some improvement for some usage of xml rather than just another syntax.

    The purpose of terse xml is just that, be terse without being obscure.
    Peter Hickman, Dec 17, 2003
    #3
  4. This is *not* XML -- do not use "XML" in the name of your language to avoid
    any confusion.


    Dimitre Novatchev.

    FXSL developer, XML Insider,
    http://fxsl.sourceforge.net/ -- the home of FXSL



    "Erik Unger" <> wrote in message
    news:3fe029d6$...
    > Don't know how many other proposals like that are
    > circulating on the web - if anybody cares: this is mine :)
    >
    > If some of you like it, i'll write a SAX parser and a converter!
    >
    >
    >
    > ?processingInstruction( text )
    >
    > ?xml(version="1.0")
    >
    > elementName(attributeName="text" otherAttributeName='5')
    > {
    > subElementName(){} // should allow to remove empty () ?
    > // emptyElement{} // we also could remove empty {} and terminate

    with ';'
    > // emptyElement;
    > // emptyElement(attrib="");
    > "text"
    > 'text: "Hello World!"'
    > }
    >
    >
    > // Single-line comment
    > /*
    > Multi-line comment
    > */
    >
    > ![CDATA([ Some CDATA ])]
    >
    > !DOCTYPE(greeting SYSTEM "hello.dtd")
    >
    > !DOCTYPE( greeting [
    > !ELEMENT( greeting (#PCDATA))
    > ])
    >
    >
    > !ENTITY(myEnt "x") // should we support entities ???
    >
    > //Simple replacement for external entities:
    > [URI]
    >
    > element(attrib="1<2")
    > {
    > "No special handling of '<>&%^'!"
    > }
    >
    >
    > NameSpace:element(AttributeNamespace:atrib="text"){}
    >
    > html(xmlns='http://www.w3.org/TR/REC-html40')
    > {
    > head()
    > {
    > title(){"Page Title"}
    > }
    > body()
    > {
    > p(){ "Go " a(href='http://www.bouncingbytes.at'){"here"} }
    > }
    > }
    >
    Dimitre Novatchev, Dec 17, 2003
    #4
  5. Erik Unger

    Erik Unger Guest

    Dimitre Novatchev wrote:
    > This is *not* XML -- do not use "XML" in the name of your language to avoid
    > any confusion.


    The syntax is not XML but the semantic is.
    So how should i call it ?
    Another Alternative Syntax for XML-like Meta Semantic (AASFXLMS) ?
    But here XML is still in the name...

    -Erik
    Erik Unger, Dec 18, 2003
    #5
  6. Erik Unger

    Erik Unger Guest

    arachno wrote:

    > hehe. looks fancy ;)
    > but probably only c++-syntax supportes will like it ;)


    Or Java, C# and all other {}-language coders,
    which are a small minority on this planet ;)

    -Erik
    Erik Unger, Dec 18, 2003
    #6
  7. Erik Unger

    Erik Unger Guest

    Peter Hickman wrote:

    > It's all a bit like terse xml, except that yours is quite verbose for no
    > good reason that i can determine.


    Many coders are used to reading such a C-like syntax!

    > How about this...
    >
    > elementName attributeName=text otherAttributeName=5
    > {
    > subElementName
    > "text"
    > }


    Looks nice too. But parentheses around attributes can help
    making the syntax more clear (and easier to parse).

    > The purpose of terse xml is just that, be terse without being obscure.


    OK. My goal is a (for humans and especially programmers) more _readable_ syntax,
    not a 'better' and/or mor terse syntax.

    -Erik
    Erik Unger, Dec 18, 2003
    #7
  8. Erik Unger

    Erik Unger Guest

    Erik Unger, Dec 18, 2003
    #8
  9. Sorry,

    I don't have time to discuss this as it is a non-xml topic.

    Publish your proposal on the xml-dev list and see what happens :eek:) They
    have a permalink on such proposals.

    Hint: Try to find other such proposals and what was said about them on the
    list. AFAIK none has succeeded.


    Dimitre Novatchev.
    FXSL developer, XML Insider,

    http://fxsl.sourceforge.net/ -- the home of FXSL
    Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html

    "Erik Unger" <> wrote in message
    news:3fe17b04$...
    > Dimitre Novatchev wrote:
    > > This is *not* XML -- do not use "XML" in the name of your language to

    avoid
    > > any confusion.

    >
    > The syntax is not XML but the semantic is.
    > So how should i call it ?
    > Another Alternative Syntax for XML-like Meta Semantic (AASFXLMS) ?
    > But here XML is still in the name...
    >
    > -Erik
    >
    Dimitre Novatchev, Dec 18, 2003
    #9
  10. In article <3fe17b04$>, Erik Unger <> wrote:

    % The syntax is not XML but the semantic is.

    ??? XML has no semantics. All it is is syntax.

    If you want a terser input syntax for XML, why not use SGML?


    --

    Patrick TJ McPhee
    East York Canada
    Patrick TJ McPhee, Dec 18, 2003
    #10
  11. Erik Unger

    Erik Unger Guest

    Patrick TJ McPhee wrote:
    > In article <3fe17b04$>, Erik Unger <> wrote:
    >
    > % The syntax is not XML but the semantic is.
    >
    > ??? XML has no semantics. All it is is syntax.


    I know, but how should i call it ?
    Meta-Syntax or, Semantic of the syntax... ;)

    > If you want a terser input syntax for XML, why not use SGML?


    You have read the whole thread ?

    and stop

    -Erik
    Erik Unger, Dec 19, 2003
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kathy Rogers
    Replies:
    0
    Views:
    345
    Kathy Rogers
    Dec 11, 2003
  2. Lois Parker
    Replies:
    4
    Views:
    385
    Lee Fesperman
    Dec 12, 2003
  3. olivier ishacian

    [ANN] XFC 3.0 - Support of OpenDocument

    olivier ishacian, Sep 29, 2006, in forum: XML
    Replies:
    0
    Views:
    400
    olivier ishacian
    Sep 29, 2006
  4. chained

    Gtkmm vs Xfc

    chained, Feb 1, 2007, in forum: C++
    Replies:
    0
    Views:
    471
    chained
    Feb 1, 2007
  5. Olivier Ishacian (news)

    [XFC] XMLmind XSL-FO Converter 4.3 released

    Olivier Ishacian (news), Jan 23, 2009, in forum: XML
    Replies:
    0
    Views:
    543
    Olivier Ishacian (news)
    Jan 23, 2009
Loading...

Share This Page