You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Tim Williams <wi...@gmail.com> on 2005/09/24 18:07:27 UTC

xdoc to xhtml2 transition

Questions on xhtml2 transition:
1) Is there agreement that we'll need an o.a.f.input.xdoc plugin?

2) Can someone make sure this xdoc2xhtml2 transform mapping is heading
in the right direction? (also, if you can give me info on the notes
below I would appreciate it)

3) If anyone is already working on this, let me know so that I can stop.

    * a -> a
    * abstract -> <p property="abstract">
    * acronym -> abbr
    * anchor -> <a id="@id">
    * area -> ??
    * authors -> <meta property="authors">
    * body -> body
    * br -> separator
    * caption
    * code -> code
    * dd -> dd
    * dl -> dl
    * document -> html
    * dt -> dt
    * em -> em
    * figure -> img
    * fixme -> <p class="fixme">
    * footer -> <section property="footer">
    * header -> head
    * icon -> img (should this be <link rel="icon">?)
    * img -> img
    * legal -> <p property="legal">
    * li -> li
    * map -> ??
    * meta -> meta
    * note -> p class="note">
    * notice -> <p class="notice">
    * ol -> ol
    * p -> p
    * person -> <meta property="person"><meta property="name"><meta
property="email"></meta>
    * section -> section
    * source -> blockcode
    * strong -> strong
    * sub -> sub
    * subtitle -> <meta property="subtitle">
    * sup -> sup
    * table -> table
    * td -> td
    * th -> th
    * title -> title
    * tr -> tr
    * type -> <meta property="type">
    * ul -> ul
    * version -> <meta property="version><meta property="minor"/><meta
property="major"/></meta>
    * warning -> <p class="warning">


Notes:
o) header/abstract & notice has a more lenient content model than
xhtml2 meta so I couldn't get them in the head.  Anyone know better?

o) li | dt - I think that the xhtml2 version of these may be more
strict than ours but I'm still trying to figure this out.

o) "img" in xhtml2.  I see there is one, but I can't figure out where
it's allowed.  If someone knows, please let me know.

Thanks,
--tim

Re: xdoc to xhtml2 transition

Posted by David Crossley <cr...@apache.org>.
Tim Williams wrote:
> Questions on xhtml2 transition:
> 1) Is there agreement that we'll need an o.a.f.input.xdoc plugin?

I agree that we do need it.

> 2) Can someone make sure this xdoc2xhtml2 transform mapping is heading
> in the right direction? (also, if you can give me info on the notes
> below I would appreciate it)

Nicola Ken had done some mappings before. Did you find
those in the archives?
http://issues.apache.org/jira/browse/FOR-184 has links
to some past threads.

I am no expert, so just a few notes from me below.

> 3) If anyone is already working on this, let me know so that I can stop.
> 
>     * a -> a
>     * abstract -> <p property="abstract">
>     * acronym -> abbr
>     * anchor -> <a id="@id">

According to the validating parsers that i have tried to use
with our existing samples in the xhtml2 plugin, that
attribute needs to be "xml:id".

>     * area -> ??
>     * authors -> <meta property="authors">
>     * body -> body
>     * br -> separator

Probably rather ...

br -> l
hr -> separator

-David

>     * caption
>     * code -> code
>     * dd -> dd
>     * dl -> dl
>     * document -> html
>     * dt -> dt
>     * em -> em
>     * figure -> img
>     * fixme -> <p class="fixme">
>     * footer -> <section property="footer">
>     * header -> head
>     * icon -> img (should this be <link rel="icon">?)
>     * img -> img
>     * legal -> <p property="legal">
>     * li -> li
>     * map -> ??
>     * meta -> meta
>     * note -> p class="note">
>     * notice -> <p class="notice">
>     * ol -> ol
>     * p -> p
>     * person -> <meta property="person"><meta property="name"><meta
> property="email"></meta>
>     * section -> section
>     * source -> blockcode
>     * strong -> strong
>     * sub -> sub
>     * subtitle -> <meta property="subtitle">
>     * sup -> sup
>     * table -> table
>     * td -> td
>     * th -> th
>     * title -> title
>     * tr -> tr
>     * type -> <meta property="type">
>     * ul -> ul
>     * version -> <meta property="version><meta property="minor"/><meta
> property="major"/></meta>
>     * warning -> <p class="warning">
> 
> 
> Notes:
> o) header/abstract & notice has a more lenient content model than
> xhtml2 meta so I couldn't get them in the head.  Anyone know better?
> 
> o) li | dt - I think that the xhtml2 version of these may be more
> strict than ours but I'm still trying to figure this out.
> 
> o) "img" in xhtml2.  I see there is one, but I can't figure out where
> it's allowed.  If someone knows, please let me know.
> 
> Thanks,
> --tim

Re: xdoc to xhtml2 transition

Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> Tim Williams wrote:

...

>> o) "img" in xhtml2.  I see there is one, but I can't figure out where
>> it's allowed.  If someone knows, please let me know.
> 
> 
> I always assumed it was allowed anywhere, but I've never checked. 
> Remember David has committed XHTML2 validation code to our SVN Head, you 
> could use that to check things.

"The img element is a holder for embedding attributes such as src. Since 
these attributes may be applied to any element, the img element is not 
strictly necessary, but is included to ease the transition to XHTML2." [1]

This means that, like the <a> element we don't really want the <img> 
element. Again, like the <a> element I'm -0 on using it - go ahead with 
the easy route if you prefer ;-)

Ross

[1] http://www.w3.org/TR/2005/WD-xhtml2-20050527/mod-image.html#sec_19.1.

Re: xdoc to xhtml2 transition

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> Questions on xhtml2 transition:
> 1) Is there agreement that we'll need an o.a.f.input.xdoc plugin?

Yes.

> 2) Can someone make sure this xdoc2xhtml2 transform mapping is heading
> in the right direction? (also, if you can give me info on the notes
> below I would appreciate it)

I see David linked you to past threads on this topic. Much of the 
mapping below has been discussed before. My comments here are from 
memory, if they contradict past agreements then use your best judgement 
as to which is the best approach.

This looks like a lis of the Document V2 elements. Internally we use 
Document v1.3 at present. Since we already have Doc V2.0 -> document 
V1.3 stylesheets I think we should be aiming at Document V1.3 -> XHTML2. 
I've gone through your list though.

> 3) If anyone is already working on this, let me know so that I can stop.
> 
>     * a -> a

a is only included in XHTML2 for legcy reasons. It is replaced by 
allowing a href attribute on all elements. I think we should follow the 
same model. Hoever, it will be easier to just directly map like you 
suggest. I'm -0 on doing it the easy way (meaning I may change it one 
day if you choose the easy route now, but I'm not contributing to this 
effort so do what you will).

>     * abstract -> <p property="abstract">

property? I thought that was only for the metadata module elements?

I think in the past we said <section class="abstract">, is property more 
appropriate?

I have a feeling that in the past we said <p class="absract"> I'm 
suggesting <section> instead because it will be easy with abstracts with 
multiple paragraphs.

>     * acronym -> abbr

OK

>     * anchor -> <a id="@id">

See above comments on <a>.

I suspect there is another recomended anchor mechanism in XHTML2, I 
*think* it is to use the id attribute on elements, this way an anchor 
can be placed anywhere without adding new elements.

>     * area -> ??

I have no idea what area in our DTD is!

>     * authors -> <meta property="authors">

We need to make "authors" whatever dublin core defines the property name 
as, but otherwise OK.

>     * body -> body

OK :-)

>     * br -> separator

separator is a replacement for <hr> in html. As David said <l> is the 
correct alternative for <br>

See 
http://www.w3.org/TR/2005/WD-xhtml2-20050527/introduction.html#s_intro_differences

>     * caption

-> caption

>     * code -> code
>     * dd -> dd
>     * dl -> dl
>     * document -> html
>     * dt -> dt
>     * em -> em
>     * figure -> img

All OK

 >     * fixme -> <p class="fixme">

<section class="fixme">? (see comments above re abstract)

>     * footer -> <section property="footer">

<section class="footer">? (see comments above re property)

>     * header -> head

OK

>     * icon -> img (should this be <link rel="icon">?)

I think this is <img class="icon">. We used icon to determine inline 
graphics before. But that is the job of CSS isn't it?

>     * img -> img

OK

>     * legal -> <p property="legal">

<section class="legal">?

>     * li -> li

OK

>     * map -> ??

What is "map"? An image Map? If it is then see 
http://www.w3.org/TR/2005/WD-xhtml2-20050527/mod-csImgMap.html#adef_csImgMap_coords

>     * meta -> meta
>     * note -> p class="note">

OK

>     * notice -> <p class="notice">

<section class="notice">?


>     * ol -> ol
>     * p -> p

OK

>     * person -> <meta property="person"><meta property="name"><meta
> property="email"></meta>

We should use the Dublin Core names for the properties. Otherwise OK.

>     * section -> section
>     * source -> blockcode
>     * strong -> strong
>     * sub -> sub

OK

>     * subtitle -> <meta property="subtitle">

I have no suggestion for an alternative, however something "feels" wrong 
with this. Go with it for now though.

>     * sup -> sup
>     * table -> table
>     * td -> td
>     * th -> th
>     * title -> title
>     * tr -> tr

OK

>     * type -> <meta property="type">

Is there a Dublin Core property name for this? What is type anyway?

>     * ul -> ul

OK

>     * version -> <meta property="version><meta property="minor"/><meta
> property="major"/></meta>

Dublin Core property name...

>     * warning -> <p class="warning">

<section class="warning">?

> Notes:
> o) header/abstract & notice has a more lenient content model than
> xhtml2 meta so I couldn't get them in the head.  Anyone know better?

Are you saying XHTML2 has direct alternatives? I'll need to look into 
this in more detail when I have time.

> o) li | dt - I think that the xhtml2 version of these may be more
> strict than ours but I'm still trying to figure this out.
> 
> o) "img" in xhtml2.  I see there is one, but I can't figure out where
> it's allowed.  If someone knows, please let me know.

I always assumed it was allowed anywhere, but I've never checked. 
Remember David has committed XHTML2 validation code to our SVN Head, you 
could use that to check things.

Ross