Generated XHTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Title of the page</title>
    <meta content="text/html;charset=UTF-8" http-equiv="Content-Type" />
    <link href="css/style.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="/JavaScript/jquery-1.4.2.min.js"></script>
</head>
<body>
    <div>
        <h1>Test Form to Test</h1>
        <form action="post" id="Form1">
            <div>
                <label>Parameter</label>
                <input type="text" value="Enter value" />
                <input type="submit" value="Submit!" />
            </div>
        </form>
        <div>
            <p>Textual description of the footer</p>
            <a href="http://google.com/"><span>You can find us here</span></a>
            <div>Another nested container</div>
        </div>
    </div>
</body>
</html>

C# Source

html
    [head
        [title["Title of the page"]]
        [meta_(
            content: "text/html;charset=UTF-8",
            http_equiv: "Content-Type")
        ]
        [link_(href: "css/style.css", rel: "stylesheet", type: "text/css")]
        [script_(type: "text/javascript", src: "/JavaScript/jquery-1.4.2.min.js")]
    ]
    [body
        [div
            [h1["Test Form to Test"]]
            [form_(action: "post", id: "Form1")
                [div
                    [label["Parameter"]]
                    [input_(type: "text", value: "Enter value")]
                    [input_(type: "submit", value: "Submit!")]
                ]
            ]
            [div
                [p["Textual description of the footer"]]
                [a_(href: "http://google.com/")
                    [span["You can find us here"]]
                ]
                [div["Another nested container"]]
            ]
        ]
    ];

Nemerle Source

html
    [head
        [title["Title of the page"]]
        [meta_(
            content = "text/html;charset=UTF-8",
            http_equiv = "Content-Type")
        ]
        [link_(href = "css/style.css", rel = "stylesheet", @type = "text/css")]
        [script_(@type = "text/javascript", src = "/JavaScript/jquery-1.4.2.min.js")]
    ]
    [body
        [div
            [h1["Test Form to Test"]]
            [form_(action = "post", id = "Form1")
                [div
                    [label["Parameter"]]
                    [input_(@type = "text", value = "Enter value")]
                    [input_(@type = "submit", value = "Submit!")]
                ]
            ]
            [div
                [p["Textual description of the footer"]]
                [a_(href = "http://google.com/")
                    [span["You can find us here"]]
                ]
                [div["Another nested container"]]
            ]
        ]
    ];

F# Source

x.html
    .[x.head.
        [x.title.["Title of the page"]]
        .[x.meta_(
            content = "text/html;charset=UTF-8",
            http_equiv = "Content-Type")
        ]
        .[x.link_(href = "css/style.css", rel = "stylesheet", ``type`` = "text/css")]
        .[x.script_(``type`` = "text/javascript", src = "/JavaScript/jquery-1.4.2.min.js")]
    ]
    .[x.body
        .[x.div
            .[x.h1.["Test Form to Test"]]
            .[x.form_(action = "post", id = "Form1")
                .[x.div
                    .[x.label.["Parameter"]]
                    .[x.input_(``type`` = "text", value = "Enter value")]
                    .[x.input_(``type`` = "submit", value = "Submit!")]
                ]
            ]
            .[x.div
                .[x.p.["Textual description of the footer"]]
                .[x.a_(href = "http://google.com/")
                    .[x.span.["You can find us here"]]
                ]
                .[x.div.["Another nested container"]]
            ]
        ]
    ]

C++ Source (Not implemented yet)

html
    (head
        (title(L"Title of the page"))
        (meta
            .content(L"text/html;charset=UTF-8")
            .http_equiv(L"Content-Type")
        )
        (link.href(L"css/style.css").rel(L"stylesheet").type(L"text/css"))
        (script.type(L"text/javascript").src(L"/JavaScript/jquery-1.4.2.min.js"))
    )
    (body
        (div
            (h1(L"Test Form to Test"))
            (form.action(L"post").id(L"Form1")
                (div
                    (label(L"Parameter"))
                    (input.type(L"text").value(L"Enter value"))
                    (input.type(L"submit").value(L"Submit!"))
                )
            )
            (div
                (p(L"Textual description of the footer"))
                (a.href(L"http://google.com/")
                    (span(L"You can find us here"))
                )
                (div(L"Another nested container"))
            )
        )
    );

Last edited Feb 7, 2011 at 11:26 AM by sergey_shandar, version 1

Comments

No comments yet.