SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Addict
    Join Date
    Oct 2003
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating custom Markup Language?

    I would like to know how to create custom Markup Language?

    For example:

    <sn:editor>
    This is text inside the editor.
    <sn:editor-heading>This is the heading</sn:editor-heading>
    </sn:editor>

    Output:

    Then convert to standard XHML and include CSS.

    [Home Sweet Home]

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,153
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    It looks like you're already on your way there. With the exception of "This is text inside the editor." which is not inside any tags. And I see you have namespaces, not exactly "beginner" level.

    What you are doing is writing an XML file (eXtensible ML) which basically means that as long as you follow the rules of XML, you can do just about anything. Then use XSLT to change it to (X)HTML (or other formats).

    Note* You can use CSS directly on XML without changing it to XHTML if you want to.

  3. #3
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Note* You can use CSS directly on XML without changing it to XHTML if you want to.
    That is not a great idea for a public website, though, since all semantics will be lost.
    Birnam wood is come to Dunsinane

  4. #4
    SitePoint Addict
    Join Date
    Oct 2003
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    It looks like you're already on your way there. With the exception of "This is text inside the editor." which is not inside any tags. And I see you have namespaces, not exactly "beginner" level.

    What you are doing is writing an XML file (eXtensible ML) which basically means that as long as you follow the rules of XML, you can do just about anything. Then use XSLT to change it to (X)HTML (or other formats).

    Note* You can use CSS directly on XML without changing it to XHTML if you want to.
    I got this <sn:editor> example tag from Bebo website, it allow user to develop own application.

    On Facebook, they use FBML (Facebook Markup Language). They have written apache module in C++ for FBML instead of using XSLT.

    However, I can not see anything on bebo website using XSLT. They probably did the same what Facebook did.
    [Home Sweet Home]

  5. #5
    SitePoint Addict
    Join Date
    Oct 2003
    Posts
    245
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I contacted Bebo, I asked how SNML (Social Network Markup Language) implemented.

    Reply from Bebo:

    A java based HTML ==> SAX parser
    [Home Sweet Home]


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •