The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Well your sample code is just an XML document. The term SNML is just an XML file using the SNML schema or DTD. The reply from Bebo is pretty vague but based on it I would guess they're parsing the XML and generating the HTML output based on what they find. If it was me I would just do an XML/XSL transformation.

Well your sample code is just an XML document. The term SNML is just an XML file using the SNML schema or DTD. The reply from Bebo is pretty vague but based on it I would guess they're parsing the XML and generating the HTML output based on what they find. If it was me I would just do an XML/XSL transformation.

Snml is the following:
1. A java based HTML ==> SAX parser
2. Several hundred Java classes that are called when a tag is recognized
3. Freemarker templates that are called by the above classes to produce the HTML that is then written out to the browser.

I'll break it down to pieces so you'll understand better.
1. SAX parser does not directly convert to HTML.
2. It first uses SAX to parse the XML, while it's parsing it's initializing "data" instance. So let say particular tag is initialized then you'll initialize "data" instance accordingly. I'm sure this "data" class is probably extending some class from FreeMarker and have specific methods to assign values.
3. After the XML has been parsed and have initialized the "data" instance then it forwards it to FreeMarker. Then, FreeMarker will generate the HTML.

What happens is the parser will be listening for specific tags to occur.

When those specific tags do occur the parser knows which tag goes with which FreeMarker template.

There could be hundreds of tags and representative FreeMarker templates.

In the example that you gave there would be a parser listener for the <sn:editor> tag and when that event is received the parser will know to grab a specific FreeMarker file and set values on that template.

Then there would also be a parser listener for the <sn:editor-heading> tag and then do the same thing as above. Find a FreeMarker file that was assigned to that parser and set values on that template.