📜 ⬆️ ⬇️

XOWML that is converted to XHTML

XOWML, a new markup language developed by Onlyweb. Read, - houml.

The language has a single purpose, to give the XHTML typesetter the ability to quickly and efficiently write valid XHTML code . Those. It works like this: you write code in XOWML, click save, the .html file automatically appears, it can be viewed in the browser.

Here are the first examples of XOWML:
 .BriefDescription {{
 .Image {% img src = "images / elephant.jpg" width = "240" height = "181" {}}
 .Description {
 .Date {August 10}
 % p {In this plate we write a brief annotation about the article.
 This will allow site visitors to understand what is at stake.}
 % p {Must be immediately determined and the size of the photo.
 It is necessary to firmly fix the width (I propose to use the one that is now)
 and the height of the photo can change without affecting the appearance of the page.
 And without a photo on the inside it will be bad - the design was originally designed
 to receive  inf.  and fast loading.}
 % a href = "#" {read fully ...}
 }
 .Clear {}
 }}

')
Converted to XHTML code:
 <div class = "BriefDescription"> <div class = "BriefDescriptionInside0">
 <div class = "Image"> <img src = "images / elephant.jpg" width = "240" height = "181" /> </ div>
 <div class = "Description">
 <div class = "Date"> August 10 </ div>
 <p> In this panel we write a brief annotation about the article.
 This will allow site visitors to understand what is at stake. </ P>
 <p> It should be immediately determined and the size of the photo.
 It is necessary to firmly fix the width (I propose to use the one that is now)
 and the height of the photo can change without affecting the appearance of the page.
 And without a photo on the inside will be bad -
 Initially, the design is oriented to receive.  inf.  and fast loading. </ p>
 <a href="#"> read full ... </a>
 </ div> <! - .Description ->
 <div class = "Clear"> </ div>
 </ div> </ div>




Those. %p.Preved{content} means <p class="Preved">content</p> .

BUT
 #news_archive {
	 .News {% p {news}}
 }

converted to
 <div id = "news_archive">
	 <div class = "News"> <p> news </ p> </ div>
 </ div>


It remains only to write software, and think about how to insert Ruby code in XOWML (for fans of other languages, PHP code, Smarty code, or something else).

In my opinion, a good idea.

Source: https://habr.com/ru/post/13723/


All Articles