Talk:Markup spec/DTD

''There was I discussion on general aspects of what should be marked up in wikipedia (names, places, dates/times...). since Wikipedia DTD is about an XML representation of the current syntax I moved it to Talk:Simple ideology of Wikitax'' --Nichtich 01:36 Feb 7, 2003 (UTC)

&lt;nowiki>&lt;![CDATA[do [not] parse ]]>&lt;/nowiki>


 * I've never been quite clear on how CDATA sections work. If my data includes a raw "]]>", how do I encode it? --Brion VIBBER 06:44 Jan 23, 2003 (UTC)


 * <![CDATA[just]]> ]]&amp;gt; <![CDATA[split]]>



Image links are functionally different from regular wiki links, as they embed images. It would be best to use a distinct tag. --Brion VIBBER 07:03 Jan 23, 2003 (UTC)


 * You're right. I suggest:

Link to the page of the image:  image:Wiki.png  

Embed image/media/file/...

  

I prefer media because we only embed media objects and embed could mean something link "embed the content of another page". See also discussion on special pages below.

   ...    ...   

These seem overcomplicated. Wouldn't it be simpler (in an XML way) to use the same tag for all links, and just have a wiki-specific URI? eg:
 * local wiki link: Main Page
 * Main Page
 * interwiki link: CommunityExpectation
 * MeatBall:CommunityExpectation
 * interlanguage link: DTD de Vikipedio
 * <link href="wiki://EsperantoWikipedia/DTD_de_Vikipedio" rel="language" lang="eo" />
 * remote non-wiki link: Slashdot
 * <link href="http://slashdot.org/">Slashdot
 * ISBN: ISBN 0-201-89683-4
 * <link href="isbn:0201896834">ISBN 0-201-89683-4

Upon (possible) reconversion to wiki syntax, the parser could use the most efficient form of representation available in that particular wiki syntax for that type of link.


 * No redundancy please
 * An XML syntax should code information in tags and attributes. parsing strings is ugly and less efficient.
 * The difference between interwiki links and local wiki links depends on the application. Try to edit test:baz</tt> since now it's a valid name but maybe there will be a "test"-wiki in the future.
 * interlanguage links are a special topic. We could use a special tag: <interlanguage href="eo:DTD_de_Vikipedio"/>
 * How about link system="url"</tt> for external links instead of url</tt> and email</tt>?

--Nichtich 22:34 Feb 2, 2003 (UTC)

It could be useful to code

User:Foo => <link system="wiki" space="user" href="Foo"/> Talk:Bar => <link system="wiki" space="talk" href="Bar"/>

and in other languages

Benutzer:Foo => <link system="wiki" space="user" href="Foo"/> Diskussion:Bar => <link system="wiki" space="talk" href="Bar"/>

But how to handle a page like: Talk:User:Foo

Also possible (for instance in the german Wikipedia):

Diskussion:Talk:User:Foo

--Nichtich 21:59 Feb 2, 2003 (UTC)

notes on paragraphs
Manual Paragraphs with the p</tt> tag are pretty ugly to handle. Try:

Hi! This is a paragraph

with an empty line in it.

You get:

Hi! This is a paragraph with an empty line in it.

but the valid syntax is

Hi! This is a paragraph with an empty line in it.

Why can't we just remove all invalid HTML-Tags? :-(

-

IMHO the interlanguage-link would be better like <interlanguage lang="eo" href="DTD_de_Vikipedio"/>

That way you give more information without the need of parsing the content of href. Lothar Kimmeringer 02:37, 15 Sep 2003 (UTC)

How about a definition of the term DTD right up front as in this external link:<BR> http://www.hyperdictionary.com/dictionary/Document+Type+Definition

Need a rationale for creating a custom DTD
Why would we create and support a fit-to-purpose DTD, when everything we use in MediaWiki is already available in DocBook XML or even Simplified DocBook?

There are many excellent tools for converting Docbook XML to various other document formats -- HTML, RTF, PostScript and PDF. It's a well-accepted standard for document markup, and it would thus be useful for readers and for downstream publishers.

Creating a custom DTD would mean that we'd have to create processors from scratch. If DocBook (or another existing XML document format) meets our needs, what's the point? --Evan 00:43, 16 Dec 2003 (UTC)


 * Hmm. Not a lot of follow up on this. Is this a ridiculous question to ask? Are people not familiar with Docbook? Is this a dead proposal? --Evan 18:43, 27 Dec 2003 (UTC)


 * There's never been a lot of motion on this XML stuff. Unless one of the interested parties is going to write some code, it's likely to stay that way. --Brion VIBBER 22:39, 27 Dec 2003 (UTC)

DocBook for exporting sounds good (MediaWiki articles => DocBook => ...) but not every DocBook article will fits in MediaWiki. Up to now you cannot validate the syntax of wikipedia articles. As I mentioned before we lack of a real (=syntax-tree generating) parser of Wiki markup so Evaluting complex requests need complex unrelyable regular expressions. In XML you can navigate through articles using XPath. But Brion is right - shame on me as I have not yet wrote a parser nor contributed the MediaWiki source in any other way ;-) -- Nichtich 18:13, 12 Jan 2004 (UTC)

Example article
I'm not sure if I understand the XML definitions. Would the following text be a valid and complete article? If not, please correct! &lt;?xml version="1.0" encoding="iso-8859-1"?&gt; &lt;article&gt; &lt;meta&gt; &lt;title interwiki="en:Jabberwocky" /&gt; &lt;/meta&gt; &lt;text&gt; `Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the &lt;link interwiki="en:Borogove"&gt;borogoves&lt;/link&gt;, And the mome raths outgrabe. &lt;/text&gt; &lt;/article&gt; -- Stw 21:22, 19 Mar 2004 (UTC)