Hello
I meet a problem and can't not solve it since many days:
I have XHTML file :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
h1 { counter-reset: section;}
h2 { counter-reset: subsection;}
h2::before {
content: counter(section) ". ";
counter-increment: section;
}
p::before {
content: counter(section) "." counter(subsection) " ";
counter-increment: subsection;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title> New Document </title>
</head>
<body>
<h1>HTML</h1>
<h2>HTML hello</h2>
<p>audio</p>
<p>embed</p>
<h2>HTML HAllo</h2>
<p>form</p>
<p>textarea</p>
<p>button</p>
</body>
</html>
And this XHTML can realize automatic numbering in HTML, and now I want convert this file into a DOCX in which can also keep the same style, I used XHTMLImporterImpl but I failed, there is no automatic numbering in the generated DOCX.
Is there any possible way to keep this css and achieve this automatic numbering in DOCX ?