XHTML+RDFa 1.1: Advice needed

Started by Ningey, September 21, 2013, 07:33:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ningey

Kaltxì!

I'm currently setting up a web page using XHTML 1.1, which shows no problems in the browser (Firefox 23.0) and also validates o.k. with the W3C XHTML validator.
However, when I attempt to transform the doctype to XHTML+RDFa 1.1, things go haywire. Either the browser starts to barf and displays an error (normally because of unknown entities), or in case the document is displayed, the validator complains instead.

The favorite reasons for complaints are:
- Unknown special characters like Ä, Ö, Ü, etc.
- profile parameter for the XHTML <head> element not present
- other parameters and/or elements that have vanished to thin air (there are more, but I don't know any more which ones)

I have established a full-fledged XHTML header as derived from selfhtml.org, including meta information according to Dublin Core:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="de"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">
<head profile="http://dublincore.org/documents/dcq-html/">
<title>Tips und Tricks zu Linux: SuSEfirewall2</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/general.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/nav.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/linux.css" />
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />

<meta name="DC.title" content="..." />
<meta name="DC.creator" content="..." />
<meta name="DC.subject" content="..." />
<meta name="DC.description" content="..." />
<meta name="DC.publisher" content="..." />
<meta name="DC.contributor" content="" />
<meta name="DC.date" content="..." scheme="DCTERMS.W3CDTF" />
<meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType" />
<meta name="DC.format" content="application/xml+xhtml" scheme="DCTERMS.IMT" />
<meta name="DC.identifier"
      content="..."
      scheme="DCTERMS.URI" />
<meta name="DC.source"
      content=""
      scheme="DCTERMS.URI" />
<meta name="DC.language" content="de" scheme="DCTERMS.RFC3066" />
<meta name="DC.relation" content="" scheme="DCTERMS.URI" />
<meta name="DC.coverage" content="" scheme="DCTERMS.TGN" />
<meta name="DC.rights" content="..." scheme="DCTERMS.URI" />
</head>


Anyone have any ideas on how to modify this header information so that I can use the RDF elements? Right now I'm out of options, and anything that I have tried so far has failed.
However, I need this transformation so I can add some markup to enable any search engines to properly index the pages.


"Sawtute ke tsun nivume - fo ke kerame!"
-- Neytiri te Tskaha Mo'at'ite

"There are two things that are infinite: Human stupidity and the universe. However, I'm not yet sure about the universe."
-- Albert Einstein

"He who gives up freedom for security deserves neither and loses both."
-- Benjamin Franklin

Tìtstewan

I think, this is more readable...
Code (html) Select
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="de"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml [url]http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd[/url]">
<head profile="http://dublincore.org/documents/dcq-html/">
<title>Tips und Tricks zu Linux: SuSEfirewall2</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/general.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/nav.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/linux.css" />
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />

<meta name="DC.title" content="..." />
<meta name="DC.creator" content="..." />
<meta name="DC.subject" content="..." />
<meta name="DC.description" content="..." />
<meta name="DC.publisher" content="..." />
<meta name="DC.contributor" content="" />
<meta name="DC.date" content="..." scheme="DCTERMS.W3CDTF" />
<meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType" />
<meta name="DC.format" content="application/xml+xhtml" scheme="DCTERMS.IMT" />
<meta name="DC.identifier"
      content="..."
      scheme="DCTERMS.URI" />
<meta name="DC.source"
      content=""
      scheme="DCTERMS.URI" />
<meta name="DC.language" content="de" scheme="DCTERMS.RFC3066" />
<meta name="DC.relation" content="" scheme="DCTERMS.URI" />
<meta name="DC.coverage" content="" scheme="DCTERMS.TGN" />
<meta name="DC.rights" content="..." scheme="DCTERMS.URI" />
</head>

A "href" in a "href"?
[href="<a href="http://purl.org/dc/elements/1.1/" rel="nofollow" target="_blank">http://purl.org/dc/elements/1.1/</a>"]
Work that?

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Blue Elf

I'm afraid this "more readable" version is not he same as original.

Original:
<html version="-//W3C//DTD XHTML 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="de"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd">

More readable version:
<html version="-//W3C//DTD XHTML 1.1//EN" 
      xmlns="<a href="http://www.w3.org/1999/xhtml" rel="nofollow" target="_blank">http://www.w3.org/1999/xhtml</a>" 
      xml:lang="de" 
      xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" rel="nofollow" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" 
      xsi:schemaLocation="<a href="http://www.w3.org/1999/xhtml" rel="nofollow" target="_blank">http://www.w3.org/1999/xhtml</a> <a href="http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" rel="nofollow" target="_blank">http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd</a>">

Your editor changed all whar looks like URL into <a href="...">...</a> tag, what is not good idea.

Back to topic: I'm afraid I have no idea how to help you, ma Ningey..
Oe lu skxawng skxakep. Slä oe nerume mi.
"Oe tasyätxaw ulte koren za'u oehu" (Limonádový Joe)


Tìtstewan

No idea what browser you are useing, but I jus mean that:

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-

Ningey

Well, that's both one and the same thing, only a bit rearranged - but that's not what I need.
The pages currently are pure XHTML 1.1, but I need a transformation to XHML+RDFa 1.1 - which, according to W3C is supposed to be a superset of XHTML 1.1, but for some reason things don't work out the way they should (missing entities or a complaining markup validator).

What I need is a transformation to accommodate RDF markups in XHTML, but also retain anything that's supposed to be present in XHTML 1.1.

I know that somehow you have to set the doctype description to something like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">
<html version="-//W3C//DTD XHTML+RDFa 1.1//EN"
      xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="de"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd">


However, when I incorporate these changes, things instantaneously go haywire.
Furthermore, I currently don't know what other parameters come into play that I might be missing here - anyway, the entire thing doesn't work the way it should after I apply the changes.


"Sawtute ke tsun nivume - fo ke kerame!"
-- Neytiri te Tskaha Mo'at'ite

"There are two things that are infinite: Human stupidity and the universe. However, I'm not yet sure about the universe."
-- Albert Einstein

"He who gives up freedom for security deserves neither and loses both."
-- Benjamin Franklin

Tìtstewan

I tryed some codes, but I'm not really sure:
Code (html) Select
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    version="XHTML+RDFa 1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/1999/xhtml
                        [url]http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd[/url]"
    lang="en"
    xml:lang="en">
<head profile="http://dublincore.org/documents/dcq-html/">
<title>Tips und Tricks zu Linux: SuSEfirewall2</title>
<link rel="stylesheet" type="text/css" href="/stylesheets/general.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/nav.css" />
<link rel="stylesheet" type="text/css" href="/stylesheets/linux.css" />
<link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
<link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />

<meta name="DC.title" content="..." />
<meta name="DC.creator" content="..." />
<meta name="DC.subject" content="..." />
<meta name="DC.description" content="..." />
<meta name="DC.publisher" content="..." />
<meta name="DC.contributor" content="" />
<meta name="DC.date" content="..." scheme="DCTERMS.W3CDTF" />
<meta name="DC.type" content="Text" scheme="DCTERMS.DCMIType" />
<meta name="DC.format" content="application/xml+xhtml" scheme="DCTERMS.IMT" />
<meta name="DC.identifier"
      content="..."
      scheme="DCTERMS.URI" />
<meta name="DC.source"
      content=""
      scheme="DCTERMS.URI" />
<meta name="DC.language" content="de" scheme="DCTERMS.RFC3066" />
<meta name="DC.relation" content="" scheme="DCTERMS.URI" />
<meta name="DC.coverage" content="" scheme="DCTERMS.TGN" />
<meta name="DC.rights" content="..." scheme="DCTERMS.URI" />
</head>
  <body>
    <p>Moved to (testlink)<a href="http://example.org/">example.org</a>.</p>
  </body>
</html>

I used this:
<html xmlns="http://www.w3.org/1999/xhtml"
    version="XHTML+RDFa 1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/1999/xhtml
                        http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd"
    lang="en"
    xml:lang="en">

-| Na'vi Vocab + Audio | Na'viteri as one HTML file | FAQ | Useful Links for Beginners |-
-| Kem si fu kem rä'ä si, ke lu tìfmi. |-