Maven Doxia

Allow correctly head element in xdoc

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-9
  • Fix Version/s: 1.1.1
  • Component/s: Module - Xdoc
  • Labels:
    None
  • Number of attachments :
    0

Description

head element is actually allowed but not correctly processed by the parser: the content of head is directly put in the core of the document.

Here is a short sample: the following is a valid m1 xdoc (correct me if I am wrong!)

<document>
  <properties>
    <title>Dummy Page</title>
  </properties>
  <head>
    <meta name="keyword" content="maven"/>
  </head>
  <body>
    <section name="blabla">
...
    </section>
  </body>
</document>

and produces the following html

...
      <div id="contentBox">

      <head>
        <meta name="keyword" content="maven"></meta>
      </head>

<a name="blabla"></a><div class="section"><h2>blabla</h2>
...

Issue Links

Activity

Hide
Lukas Theussl added a comment -

This is actually a dupe of MSITE-194.

Show
Lukas Theussl added a comment - This is actually a dupe of MSITE-194.
Hide
Dennis Lundberg added a comment -

I've had a look at this. The head element is currently not parsed at all, so it ends up inside the document.

There are mechanisms in Sink to handle <meta name="author" .../> and <meta name="date" .../> but not for <meta name="keyword" .../>. So in order for this to work we need to add the methods Sink.keyword() and Sink.keyword_().

That said I haven't succeeded in parsing author and date correctly.

Also, there is no standard set of meta names that are valid. We would have to specify that ourselves in the DTD/XSD. See http://www.w3.org/TR/html401/struct/global.html#h-7.4.4

Show
Dennis Lundberg added a comment - I've had a look at this. The head element is currently not parsed at all, so it ends up inside the document. There are mechanisms in Sink to handle <meta name="author" .../> and <meta name="date" .../> but not for <meta name="keyword" .../>. So in order for this to work we need to add the methods Sink.keyword() and Sink.keyword_(). That said I haven't succeeded in parsing author and date correctly. Also, there is no standard set of meta names that are valid. We would have to specify that ourselves in the DTD/XSD. See http://www.w3.org/TR/html401/struct/global.html#h-7.4.4
Hide
Lukas Theussl added a comment -

Fixed in r763127. The meta tags are emitted as 'unknown' Sink events that are picked up by the XhtmlBaseSink.
In order to profit from this in the site plugin (MSITE-194), we still need to fix DOXIASITETOOLS-19.

Show
Lukas Theussl added a comment - Fixed in r763127. The meta tags are emitted as 'unknown' Sink events that are picked up by the XhtmlBaseSink. In order to profit from this in the site plugin (MSITE-194), we still need to fix DOXIASITETOOLS-19.
Hide
Data Nucleus added a comment -

Anyone know how do I access such <head> meta elements from a Velocity file (site.vm) ? got an example?

Show
Data Nucleus added a comment - Anyone know how do I access such <head> meta elements from a Velocity file (site.vm) ? got an example?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: