Re: [xsl] Testing implicit XHTML hierarchy

Subject: Re: [xsl] Testing implicit XHTML hierarchy
From: "bryan rasmussen" <rasmussen.bryan@xxxxxxxxx>
Date: Thu, 5 Jul 2007 00:18:49 +0200
Well, the following:

<html xmlns="http://www.w3.org/1999/xhtml"; ><head></head>
<body>
<div>
<div><div><div><h2>h</h2></div></div></div>
<h1>h</h1>
</div>
<h2>h</h2>
<h2>h</h2>
<h5>h</h5>
<div>
<h2>h</h2>
<div>
<h5>h</h5>
<h4>h</h4></div><h5>h</h5>
<h2>h</h2></div>
</body>
</html>

raises one error.

One of the strengths often cited for Schematron among people who use
it is the ability to control error output to give all error responses.
If I understand what you were saying earlier there is more than one
error here right?

In Schematron I would basically have it as a rule for each heading.

And then an assert along the lines of what I said.
But I guess discussing that too much would make this a Schematron
thread and thus not proper for the xsl-list


Cheers, Bryan Rasmussen



On 7/4/07, Jesper Tverskov <jesper@xxxxxxxxxxx> wrote:
On 7/4/07, bryan rasmussen <rasmussen.bryan@xxxxxxxxx> wrote:
> is the idea though that there can be the following:
>
> h1
>  h2
>  h3
> h1
>  h2
>  h2

No there can only be one h1 and it must start the implicit hierarchy
(that is nested sections without having them), just like we can only
have one top element in XML.

My own tests indicate that my XPath expressions are working, I am only
asking for better ways to do the same thing if they exist or if I have
overlooked something.

Cheers,
Jesper

Current Thread