STxT: The Book

A language for the web

Chapter 9: Semantic Web

The time has come to go further.

Welcome to the semantic web.

A Proposal for the Web

I’ve seen many proposals before, but in my opinion, they don’t quite work. I’m going to say something that some people may not like:

HTML is not semantic.

Again, I’m sorry, but it’s true. HTML has never been a good semantic language, though it’s fine for presenting content. A lot has been done to separate content from presentation, but I think there’s still a long way to go. And I’m not sure it’s heading in the right direction.

What do we have right now?

Well, there’s HTML for content. Then we have CSS for presentation. It’s mixed, shaken well, and we get a fantastic web page. We also have the major search engines, which usually give us good results. Not always what we want, but that’s inevitable.

But let’s go back to HTML and CSS. Is it really semantic? I don’t think so. HTML4 obviously wasn’t, and now we’ve evolved to HTML5, but what have we gained? A lot in terms of standardization and language evolution, but let’s not fool ourselves: HTML is still based on presentation.

What’s my proposal? Are you really asking?

Semantic Text

Okay, it’s clear: STxT. And how do you make the semantic web with STxT?

I don’t know, though I suspect it’s one of the best ways to do it today :-D

What did you expect? That I’d give you everything ready-made? If we get anywhere with STxT, we’ll see. My visionary powers aren’t that advanced :-)

The following sections are ideas, ways I’ve thought of, but there’s no concrete proposal. There are many scenarios where we can imagine this new technology, and many ways to apply it. Right now, I don’t even know, but I can see its potential. I hope others see it too and know how to apply it.

Ideas

Replace HTML5!!

What madness is that!! We’ve spent years evolving, making browsers,... how could we do something like that!!

That’s crazy >:-O

I know, but let me show you my vision. This is for IT people and those who work with HTML.

Relax, I’m going to hypnotize you.

With STxT, everything can change; it’s a new world, a new way of thinking. Let’s not close ourselves off to anything.

Clear your mind. Now there’s nothing. Nothing exists yet. We’re in 1985. We haven’t heard of SGML, HTML, hyperlinks, or CSS. We know someone with a PC, and they use the command line to do things.

Someone tells us that a new language has been invented. It’s called STxT and is used to express ideas and display text.

Now we have a vision of the future, and we’re in 2020, and we see a web, but we know nothing about IT. The web looks a lot like today’s, but everything is structured with STxT.

You wonder... How is it made? What’s it like inside?

...

...

...

...

WAKE UP!!!

What did you see?

Well, since you can’t answer, I’ll tell you what I saw. It might help you, or maybe it’s just nonsense, but it’s my vision.

Web pages are STxT pages, with each website and portal defining its own structure.

This allows us to see the web as a well-differentiated set of content pages. For example, for a cooking website:

/recipes/*.stxt
/tips/*.stxt
/diets/*.stxt

In addition, every web portal has a series of pages that give us information on how to format or present the text. A group of people was in charge of doing this, and they did a great job. They were at the W3C.

They made some STxT documents that allowed this, and all the websites used them because of their popularity. Also, since there were fantastic STxT viewers, everything could be integrated without problems, and multiple viewers were created.

The pages that a website had to have were a few. The main ones were:

robots.stxt
sitemap.stxt
styles.stxt
/styles/*.stxt

With these pages, we could get an idea of the portal’s content, while applying styles to the entire set. The best thing about the styles is that they were applied automatically depending on the document type, and it was very easy to create new styles. A document was created following a well-known and easy-to-use namespace: w3c.org/css.stxt

So, the pages were very easy to create. With a simple STxT editor, a page with perfect content was built. A designer created a fantastic style for it, and finally, a programmer gave it dynamic behavior by creating a js file for each page type (a scripting language to add behavior to these pages).

Thus, for example, our cooking website would look like this:

robots.stxt
sitemap.stxt
styles.stxt

/styles/recipe.stxt
/styles/tips.stxt
/styles/diets.stxt

/dynamic/recipe.js
/dynamic/tips.js
/dynamic/diets.js

/images/*.png
/images/*.gif
...

/recipes/recipe1.stxt
/recipes/recipe2.stxt
/recipes/recipe3.stxt
...

/tips/tip1.stxt
/tips/tip2.stxt
/tips/tip3.stxt
...


...
...
...

Okay, that’s it. Sorry for the simplicity of the scheme, but a hypnosis session doesn’t allow for more :-) I don’t know if this will spark your imagination, but I hope it at least makes you think. Not everything is fine as it is. There’s always room for improvement. To do things differently. And we’re IT people. We have to try. And experiment. And make mistakes. It’s the only way to move forward.

Search Engines

I believe search engines and browsers, in general, would increase their ability to search and index content by knowing what the text is about. Also, it would already be hierarchized, and each part would have a specific and well-defined meaning.

It’s possible that famous STxT templates would emerge, and a page could follow them to display certain content. This would make indexing even easier, as it would unify certain aspects.

The Transition

How should the transition be? It should be easy and transparent. Otherwise, there won’t be a transition. The first thing would be to define the new way of viewing documents with STxT and the new CSS. By the way, it would be a good time to make the CSS and have a first version. Maybe the browser renders would finally treat them all the same!

From here, a time of coexistence of pages is expected. There will be traditional HTML pages alongside STxT pages. I also imagine a good time to integrate and unify a "lightweight language" for content. I would like the W3C to take an interest in this whole process. Although it would be a very alternative approach to everything that is being done now. But it shouldn’t be traumatic either. STxT can be thought of as another extension for browsers to consider, with a particular way of viewing. The visualization would be very similar to XML when there are no CSS or standard elements, and as the web incorporated them, the appearance would improve.

We can even consider the coexistence of HTML pages with a more structured STxT counterpart. HTML would contain metatags telling search engines that it has an associated STxT, as indexing through this file would be more appropriate.

Let’s not forget that the goal of all this is to reach the semantic web in a non-traumatic way, easy for everyone, not just super-IT experts.

SWB: Semantic Web Builder

I couldn’t end this chapter without talking about SWB. This is the first STxT application ever made. Well, I know it’s the first because it was made to publish this website, and there was nothing else before it :-D

I could also say that it’s the first website to show content not only in HTML but also in STxT.

I can say that the experience of using STxT has been truly impressive.

I’ve been programming for the web for years, and I’ve never felt so comfortable before. Even without editing tools, the process of creating the book has been simply a joy. I encourage you all to try it.

It’s worth it ;-)

This website uses cookies to ensure you get the best experience on our website. [cookies.html|Learn more] Got it! More info