XML for Coders (XFC)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik Unger

    XML for Coders (XFC)

    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!



    ?processingInst ruction( text )

    ?xml(version="1 .0")

    elementName(att ributeName="tex t" otherAttributeN ame='5')
    {
    subElementName( ){} // should allow to remove empty () ?
    // emptyElement{} // we also could remove empty {} and terminate with ';'
    // emptyElement;
    // emptyElement(at trib="");
    "text"
    'text: "Hello World!"'
    }


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

    ![CDATA([ Some CDATA ])]

    !DOCTYPE(greeti ng 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:eleme nt(AttributeNam espace:atrib="t ext"){}

    html(xmlns='htt p://www.w3.org/TR/REC-html40')
    {
    head()
    {
    title(){"Page Title"}
    }
    body()
    {
    p(){ "Go " a(href='http://www.bouncingbyt es.at'){"here"} }
    }
    }

  • arachno

    #2
    Re: XML for Coders (XFC)

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


    Comment

    • Peter Hickman

      #3
      Re: XML for Coders (XFC)

      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=t ext otherAttributeN ame=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.bouncingbyt es.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.

      Comment

      • Dimitre Novatchev

        #4
        Re: XML for Coders (XFC)

        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" <Erik.Unger@gmx .at> wrote in message
        news:3fe029d6$1 @e-post.inode.at.. .[color=blue]
        > 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!
        >
        >
        >
        > ?processingInst ruction( text )
        >
        > ?xml(version="1 .0")
        >
        > elementName(att ributeName="tex t" otherAttributeN ame='5')
        > {
        > subElementName( ){} // should allow to remove empty () ?
        > // emptyElement{} // we also could remove empty {} and terminate[/color]
        with ';'[color=blue]
        > // emptyElement;
        > // emptyElement(at trib="");
        > "text"
        > 'text: "Hello World!"'
        > }
        >
        >
        > // Single-line comment
        > /*
        > Multi-line comment
        > */
        >
        > ![CDATA([ Some CDATA ])]
        >
        > !DOCTYPE(greeti ng 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:eleme nt(AttributeNam espace:atrib="t ext"){}
        >
        > html(xmlns='htt p://www.w3.org/TR/REC-html40')
        > {
        > head()
        > {
        > title(){"Page Title"}
        > }
        > body()
        > {
        > p(){ "Go " a(href='http://www.bouncingbyt es.at'){"here"} }
        > }
        > }
        >[/color]


        Comment

        • Erik Unger

          #5
          Re: XML for Coders (XFC)

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

          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

          Comment

          • Erik Unger

            #6
            Re: XML for Coders (XFC)

            arachno wrote:
            [color=blue]
            > hehe. looks fancy ;)
            > but probably only c++-syntax supportes will like it ;)[/color]

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

            -Erik

            Comment

            • Erik Unger

              #7
              Re: XML for Coders (XFC)

              Peter Hickman wrote:
              [color=blue]
              > It's all a bit like terse xml, except that yours is quite verbose for no
              > good reason that i can determine.[/color]

              Many coders are used to reading such a C-like syntax!
              [color=blue]
              > How about this...
              >
              > elementName attributeName=t ext otherAttributeN ame=5
              > {
              > subElementName
              > "text"
              > }[/color]

              Looks nice too. But parentheses around attributes can help
              making the syntax more clear (and easier to parse).
              [color=blue]
              > The purpose of terse xml is just that, be terse without being obscure.[/color]

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

              -Erik

              Comment

              • Erik Unger

                #8
                List of XML Alternatives [Was: XML for Coders (XFC)]

                Erik Unger wrote:
                [color=blue]
                > Don't know how many other proposals like that are
                > circulating on the web[/color]

                Now I know at least the following list:



                -Erik

                Comment

                • Dimitre Novatchev

                  #9
                  Re: XML for Coders (XFC)

                  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 :o) 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" <Erik.Unger@gmx .at> wrote in message
                  news:3fe17b04$1 @e-post.inode.at.. .[color=blue]
                  > Dimitre Novatchev wrote:[color=green]
                  > > This is *not* XML -- do not use "XML" in the name of your language to[/color][/color]
                  avoid[color=blue][color=green]
                  > > any confusion.[/color]
                  >
                  > 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
                  >[/color]


                  Comment

                  • Patrick TJ McPhee

                    #10
                    Re: XML for Coders (XFC)

                    In article <3fe17b04$1@e-post.inode.at>, Erik Unger <Erik.Unger@gmx .at> 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
                    ptjm@interlog.c om

                    Comment

                    • Erik Unger

                      #11
                      Re: XML for Coders (XFC)

                      Patrick TJ McPhee wrote:[color=blue]
                      > In article <3fe17b04$1@e-post.inode.at>, Erik Unger <Erik.Unger@gmx .at> wrote:
                      >
                      > % The syntax is not XML but the semantic is.
                      >
                      > ??? XML has no semantics. All it is is syntax.[/color]

                      I know, but how should i call it ?
                      Meta-Syntax or, Semantic of the syntax... ;)
                      [color=blue]
                      > If you want a terser input syntax for XML, why not use SGML?[/color]

                      You have read the whole thread ?

                      and stop

                      -Erik

                      Comment

                      Working...