[
https://issues.apache.org/jira/browse/DOXIA-699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699798#comment-17699798
]
Konrad Windszus edited comment on DOXIA-699 at 3/13/23 7:06 PM:
----------------------------------------------------------------
The problem is inconsistencies between the values in
{{Xhtml5BaseParser.sectionLevel}} and {{Xhtml5BaseParser.headingLevel}}. It is
unclear what their meaning is, particularly as getSectionLevel() returns
{{headingLevel}}. [~michael-o] Do you have any insights here?
If you add the following testcase to {{Xhtml5BaseParser}} you have one section
closing method missing:
{code}
@Test
public void testSectionsAndHeadings() throws ParseException {
String text =
"<body><h1>Headline1</h1><section><h2>Headline2</h2></section></body>";
parser.setValidate(false);
parser.parse(text, sink);
Iterator<SinkEventElement> it = sink.getEventList().iterator();
// TODO: this leads to a list with a missing section1_ method
}
{code}
was (Author: kwin):
The problem is inconsistencies between the values in
{{Xhtml5BaseParser.sectionLevel}} and {{Xhtml5BaseParser.headingLevel}}. It is
unclear what their meaning is, particularly as getSectionLevel() returns
{{headingLevel}}. [~michael-o] Do you have any insights here?
> Xhtml5Parser may emit sectionX() without sectionX_()
> ----------------------------------------------------
>
> Key: DOXIA-699
> URL: https://issues.apache.org/jira/browse/DOXIA-699
> Project: Maven Doxia
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-M5
> Reporter: Konrad Windszus
> Priority: Major
> Attachments: test.xhtml5
>
>
> Due to the logic in
> https://github.com/apache/maven-doxia/blob/37173794270ee68894aac0e252dcb87545770952/doxia-core/src/main/java/org/apache/maven/doxia/parser/Xhtml5BaseParser.java#L631
> there may calls of {{Sink.sectionX()}} without the according call of
> {{Sink.sectionX_()}}.
> The attached XHTML5 being parsed and then converted back through the Sink to
> XHTML5 is invalid (lacks one closing section tag).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)