xsl-list
[Top] [All Lists]

Re: [xsl] Testing implicit XHTML hierarchy

2007-07-04 15:26:41
thus if I remove the h1 error

<html xmlns="http://www.w3.org/1999/xhtml"; ><head></head>
<body>
<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>

I get no errors using Saxon8 from a month or so ago.

I guess these are errors by the h2 rules you put out? for example that
there is an h2 with the next header following is an h5.

This problem is, by my initial reading of the code, likely to be found
in the rest of the heading matches.

Cheers,
Bryan Rasmussen

On 7/5/07, bryan rasmussen <rasmussen(_dot_)bryan(_at_)gmail(_dot_)com> wrote:
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(_at_)tverskov(_dot_)dk> wrote:
> On 7/4/07, bryan rasmussen <rasmussen(_dot_)bryan(_at_)gmail(_dot_)com> 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
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--