mediawiki-mark-up-issues
From Microformats
[edit]
MediaWiki mark-up issues
| Table of contents |
Issues with adding microformat mark-up to sites using MediaWiki (http://www.mediawiki.org/) (such as this wiki, and Wikipedia (http://wikipedia.org)).
If you know of a solution, or work-around, please post it!
[edit]
Author
[edit]
Contributor(s)
[edit]
URLs
- Wiki mark-up such as
[http://example.com sample text](which displays as sample text (http://example.com)) cannot have a class="url" added to the output "A" element.- Workaround (if display of the URL is acceptable): use
<span class="url">http://example.com</span>(which displays as http://example.com) - Workaround (if display of the URL is not acceptable): ???
- Why not just use
<span class="url">[http://example.com sample text]</span>? --Tgrtalk / home 06:16, 9 Aug 2007 (PDT)- Returns a value of "sample text" Andy Mabbett 02:12, 10 Aug 2007 (PDT)
- Why not just use
- Workaround (if display of the URL is acceptable): use
- The ExtendAnchorTags (http://www.mediawiki.org/wiki/Extension:ExtendAnchorTags) extension provides a work around using <xa></xa> tags, e.g.
<xa class="fn org" href="http://microformats.org/">microformats</xa>
will produce
<a fn class="fn org" href="http://microformats.org/>microformats</a> --jeffmcneill 17:22, 20 Oct 2007 (PDT)
[edit]
Rel
- Similarly, MediaWiki does not appear to support the use of the
relattribute on internal or external links.- See ExtendAnchorTags (http://www.mediawiki.org/wiki/Extension:ExtendAnchorTags) extension --jeffmcneill 17:22, 20 Oct 2007 (PDT)
[edit]
Tables
- In the following code snippet (from an "infobox (http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Infoboxes)" table with an included hCard):
{| class="infobox vcard"
| class="fn org" | '''{{{name}}}'''
|-
{{#if: {{{address|}}} |
! Address
{{!}} <span class="street-address">{{{address}}}}}</span>
|-
{{#if:{{{city|}}} |
! City
{{!}} <span class="locality">{{{city|}}}}}</span>
|-
{{#if:{{{country|}}} |
! Country
{{!}} <span class="country-name">{{{country|}}}}}</span>
|-
{{#if:{{{latitude|}}} |
!
{{!}} <{{Coord|{{{latitude}}}|{{{longitude}}}|display=title}} }}
|}
- there is nowhere to hang the required
class="adr", such that it wraps the three relevant table rows, and no others.
- you can give a row a class (or any other valid HTML attribute) with
{{!}} class="adr" {{!}} <span...--Tgrtalk / home 06:16, 9 Aug 2007 (PDT)- The need is not to apply a class to a single row, but (as stated) to apply it to (in this example) "the three relevant table rows, and no others". Andy Mabbett 02:14, 10 Aug 2007 (PDT)
- It seems this is a challenge with HTML tables and not necessarily MediaWiki? Please advise --jeffmcneill 17:22, 20 Oct 2007 (PDT)
- Partly; but in HTML you can hang an intermediate class on <tbody>. Andy Mabbett 15:42, 19 Jan 2008 (PST)
- It seems this is a challenge with HTML tables and not necessarily MediaWiki? Please advise --jeffmcneill 17:22, 20 Oct 2007 (PDT)
- The need is not to apply a class to a single row, but (as stated) to apply it to (in this example) "the three relevant table rows, and no others". Andy Mabbett 02:14, 10 Aug 2007 (PDT)
[edit]
Abbr
- MediaWiki supports the use of the
abbrelement, but this is disabled by some implementations (e.g. Wikipedia)- See title-trigger for a proposed alternative to the abbr-design-pattern, which would work on Wikipedia.
- A mediawiki extension EnableAbbrTags (http://www.mediawiki.org/wiki/Extension:EnableAbbrTags) can support abbr by using a new xabbr command
- See title-trigger for a proposed alternative to the abbr-design-pattern, which would work on Wikipedia.
[edit]
Dtend
- The work-around for date-time pattern on Wikipedia (for example, birthdays in hCard) has been to use templates to output something like:
24 February 1993 (<span class="bday" style="display:none">1993-02-24</span>)
which degrades gracefully if CSS is not available. It is not acceptable to do so, to show the date advanced by one day for end-dates in hCalendar.
- See this proposal to resolve exclusive end-date issue (http://microformats.org/discuss/mail/microformats-discuss/2007-August/010449.html), for a proposal which would allow inclusive end dates to be marked up.
[edit]
XMDP
- As with many CMSs, there is no facility for an editor to add an XMDP URI to (or in any other way to alter) the
headelement.
- Extensions can do this, working on it... --jeffmcneill 17:22, 20 Oct 2007 (PDT)
[edit]
Address
Address elements cannot be added to page content.
<address class="vcard">The <span class="fn org">Microformat community</span></address>
displays as:
- <address class="vcard">The Microformat community</address>
- Not sure how this is a problem, which microformat uses this format? Markup within divs such as
<div class="adr"></div>
work fine. --jeffmcneill 01:14, 21 Oct 2007 (PDT)
- hAtom uses <address>. Andy Mabbett 15:42, 19 Jan 2008 (PST)
[edit]
Mediawiki extension development
- Are there any generic xml parsers/other extensions under development to provide support for some (most?) of the microformat needs? Is semantic mediawiki (http://ontoworld.org/wiki/Semantic_MediaWiki) a possible candidate for microformat support?
- It appears that semantic mediawiki is trying to do something different, namely OWL compliance. Based on the mediawiki description of the semantic mediawiki project (http://meta.wikimedia.org/wiki/Semantic_MediaWiki), hacks are to some extent discouraged (which to my mind is the orientation of Microformats). --jeffmcneill 13:41, 18 Oct 2007 (PDT)
- Am working out the extensions needed to address this. --jeffmcneill 17:22, 20 Oct 2007 (PDT)
