Does semantic web use XML instead of HTML or JSON?
Asked Answered
D

2

5

While I am trying to understand what semantic web is and what technologies are used, I saw from https://en.wikipedia.org/wiki/Semantic_Web#Semantic_Web_solutions

The Semantic Web takes the solution further. It involves publishing in languages specifically designed for data: Resource Description Framework (RDF), Web Ontology Language (OWL), and Extensible Markup Language (XML). HTML describes documents and the links between them. RDF, OWL, and XML, by contrast, can describe arbitrary things such as people, meetings, or airplane parts.

In Semantic web,

  • is HTML not used at all, and is XML used instead?

    Is the principle of separation of semantics (content) from presentation in HTML not related to semantic web?

  • Is JSON not used and is XML used instead?

    JSON is overwhelmingly used for representing data than XML, and if semantic web uses XML, does it mean that semantic web is not a trend?

In related tags to semantic web, I find more HTML tag than XML tag, and can't find JSON tag.

Datolite answered 30/4, 2019 at 12:34 Comment(2)
The links in my post may provide some context. I am not sure what you mean by "the web of documents" and "semantic web development".Datolite
Semantic Web does not use one syntax or another - there are multiple formats to render ontologies and axioms, and XML, HTML and JSON are included among the options. There's N3, N-Triples, Functional Syntax (for OWL), Manchester Syntax (for OWL), and at least two XML variants, RDF/XML (for RDF and OWL) and OWL/XML for OWL. These are simply differences in formatting of the files, conceptually they're all equivalent.Daguerreotype
T
4

The term "semantic web" refers primarily to a concept, rather than a particular implementation of that concept.

Over time, various standards have been developed and implemented with the aim of implementing the concept, and in particular the W3C has a long-running project to create a stack of such standards covering the requirements they see for a successful semantic web. The W3C tries to build standards on top of each other, and sees XML as the base on which much of the rest of their work is based, so their definitions often use an XML syntax.

In practice, though, HTML is overwhelmingly the language of the web, and XHTML (an attempt to re-specify HTML as an XML-based standard) is considered to have failed. As such, HTML-based technologies such as "microformats" (metadata embedded in HTML via specific patterns of markup) are a popular alternative to more strictly machine-oriented XML formats, and are often designed to interact with them.

Similarly, JSON became popular as a light-weight data interchange format without the perceived complexity of XML and XML-based document standards. Over time, tools have been built to formalise and work with JSON, some of which may well be involved in "semantic web" concepts.

I think an important distinction is between the low-level markup format of data - XML, HTML, JSON - and the higher-level technologies being implemented. For instance, RDF can be written in various "concrete syntaxes"; one of those is an XML-based markup, but others are designed to be "human-readable" (Turtle/N3), embedded in HTML (RDFa) or combined into a JSON format (JSON-LD). The same is true of other standards, such as OWL. It is therefore somewhat misleading to think about "using XML instead of HTML or JSON"; the real distinction might be more like "using an Ontology definition rather than a document template".

Tarsometatarsus answered 30/4, 2019 at 13:53 Comment(2)
It is not just possible to create JSON- or HTML-based RDF representations. It has been done, and these representations are mature W3C standards: JSON-LD and RDFa, respectively.Braunschweig
@Braunschweig Thanks, I've reworded to make that statement stronger. :)Tarsometatarsus
P
4

RDF is conceptually a graph database with OWL providing logic features (axioms for extending a ground RDF graph with additional induced tuples such as for transitivity). RDF has per se nothing to do with markup (XML, SGML, HTML) but RDF/XML is one of several standardized serialization formats for an RDF graph, another one being turtle/N3.

However, RDF was specifically introduced to represent semantic data on the Web. Hence, there are additional serialization formats for RDF graphs in Web documents: RDFa for embedding RDF data in HTML or XML documents, and JSON-LD as a JSON format for serializing RDF graphs (with a focus on linked data).

Pazpaza answered 30/4, 2019 at 14:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.