Maven Doxia

Doxia omits </p> closing elements

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Consider the following xdoc file:

<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>test1</title>
</properties>

<body>
<section name="section name">
<p>text
<ul>
<li>list1</li>
</ul>
text2
<ul>
<li>list1</li>
</ul>
</p>
</section>
</body>
</document>

This renders to the following HTML output:

<a name="section name"></a><div class="section"><h2>section name</h2>
<p>text
<ul>
<li>list1</li>
</ul>
text2
<ul>
<li>list1</li>
</ul>

</div>

Please note that there is no closing </p> between </ul> and </div>

This is obviously no valid XHTML.

Activity

Hide
Dennis Lundberg added a comment -

The supplied xdoc example is not valid either.
You should not have a list within a paragraph.
Try this code instead:

<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>test1</title>
</properties>

<body>
<section name="section name">
<p>text
</p>
<ul>
<li>list1</li>
</ul>
<p>
text2
</p>
<ul>
<li>list1</li>
</ul>
</section>
</body>
</document>
Show
Dennis Lundberg added a comment - The supplied xdoc example is not valid either. You should not have a list within a paragraph. Try this code instead:
<?xml version="1.0" encoding="UTF-8"?>
<document>
<properties>
<title>test1</title>
</properties>

<body>
<section name="section name">
<p>text
</p>
<ul>
<li>list1</li>
</ul>
<p>
text2
</p>
<ul>
<li>list1</li>
</ul>
</section>
</body>
</document>
Hide
Henning Schmiedehausen added a comment -

After adding the XDOC DTD, the error shows up. So this should probably be "XDOC Renderer should reject invalid XDOC files".

However, this is valid according to the DTD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//Apache Software Foundation//DTD XDOC 1.0//EN" "http://maven.apache.org/dtd/xdoc_1_0.dtd">

<document>
<properties>
<title>Doxia 95</title>
</properties>

<body>
<section name="section name">
text

<ul>
<li>list1</li>
</ul>

text2

<ul>
<li>list1</li>
</ul>
</section>
</body>
</document>

and renders out without any <p> tags. Is this intentional or a shortcoming of the DTD?

Show
Henning Schmiedehausen added a comment - After adding the XDOC DTD, the error shows up. So this should probably be "XDOC Renderer should reject invalid XDOC files". However, this is valid according to the DTD: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE document PUBLIC "-//Apache Software Foundation//DTD XDOC 1.0//EN" "http://maven.apache.org/dtd/xdoc_1_0.dtd"> <document> <properties> <title>Doxia 95</title> </properties> <body> <section name="section name"> text <ul> <li>list1</li> </ul> text2 <ul> <li>list1</li> </ul> </section> </body> </document> and renders out without any <p> tags. Is this intentional or a shortcoming of the DTD?
Hide
Vincent Siveton added a comment -

It is the normal way for parsing xdoc

Show
Vincent Siveton added a comment - It is the normal way for parsing xdoc
Hide
Jason van Zyl added a comment -

So can we close this?

Show
Jason van Zyl added a comment - So can we close this?
Hide
Henning Schmiedehausen added a comment -

Probably yes.

Show
Henning Schmiedehausen added a comment - Probably yes.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: