Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Zen1th

OETF #14 - Open Hypertext Markup Language

Recommended Posts

OHML v1.0.2

OHML is a markup language based on the eXtensible Markup Language (XML), it is a simpler and OC-graphics adapted version of HTML.

Why OHML?
It all started when i noticed that most network programs/libraries were either DNS system, or Website system.
However it is very important to maintain an universal language for webpages. It is the first step of having
a stable and universal "OCranet", which will follow with server and client implementations. Protocols, etc..

Concepts

  • HRef: Shortcut for Hyperlink Reference

Document Versions

OHML patch versions (1.0.1, 1.0.5, etc.) minor changes (more understandable descriptions, new optional arguments) can be asked in comments section, might get accepted, and when features are froze, set as a new minor version of OHML specifications.

OHML minor versions (1.2, 1.1, 1.42) OHML major versions (2, 4, 5) are to be proposed in comments sections and feature froze. Once released they will replace the outdated data in this post.

Tags

Table about all tags and their (XML) arguments is available in png format, attached to this topic.

table.png.93325a59752b4c5eac0a710cc9b75c6d.png

h1-h5

6-2 sized OC character font title, each letter must be made from the number of character both in width and height. The font can be any font, as long as it respects the size rule.

text

This tag allows to display a text line. If putting the text in the plain document, due to the XML nature line breaks wouldn't be counted. In the text tag they aren't counted neither, but at each tag end, a line is skipped.

script

This contains any script made for any scripting language supported by the Browser. The attribute "lang" defines the scripting language, it defaults to "application/lua" for LuaWeb, however it remains an XML tag and will not work well with multi lines, the solution is CDATA, simply add a comment and add <![[CDATA, then at the end of script do another command and put ]]> , this will effectively allow the use of multilines scripts.

a

Displays inline text, it haves, by default, a blue color. When it is clicked the page jumps to the hyperlink reference defined by "href" attribute.

image

Contains one attribute: "file". This is the path of the image treated as an Hyperlink reference.

br

Breaks a line, which mean that a text line is skipped, this act the same as <text></text> but cannot contains any text.

Tags Position

Tags have optional arguments "x", "y", "width", "height" and "relative"

The "relative" argument is for using relative positions, vertical at first, and horizontal at last, we can use "up" (default) or "bottom", put a ";" for splitting, and add the horizental value that can be "left" or "right".
Relative positions works that if for example the value is "bottom;right", and if x = -5 and y = -5, the element Y will be at the most bottom point of the page (meaning that bottom for a page with elements not going after 10 for y, the bottom would be 10), added -5, which is equivalent of minus 5, and the element X will be at most-right point (generally viewport width) and will have minus 5.

Meaning that for a page sizing 80;25, it would go at 75;20

Hyperlink Reference
An hyperlink reference can be relative or absolute.
If a HRef starts with any supported protocol name followed by "://" (ex: ohtp://), the link is fully absolute and will replace the current address. It must be an URI.
Otherwise, if an HRef starts with "/", it is relative to the website host (e.g: ohtp://test.com), so, the full path is: {WEBSITE HOST} + {HREF}
Finally, starts with nothing above, it is relative and should be appended to the actual URL

URI are in the same format than real ones which is "protocol://host(/page)"

OHML, being a markup language, will not support any kind of dynamic coding like <if> statements, <print> statements, etc., dynamic coding is handled by <script> tags and scripts languages supported by the browser. (Currently no script language has been made, it's coming).

For now one implementation has been made and it is the reference one called Minescape.

 

Share this post


Link to post
Share on other sites

Yes i have discord, anyways if i mentionned GERT it's because i find interesting the idea of connecting minecraft servers each other. It allows for a OC "internet", since oc servers can now technically be acessed from any minecraft server having a GERT address. Which allows for endless possibilities in oc web.

Share this post


Link to post
Share on other sites

I made a first implementation capable of parsing and displaying OHML. This implementation supports most things except: relative positions, buttons, images and progress bars. It's called minescape and for now is only published on my repo (available with Fuchas's fpm command)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.