Service result


Main

Here is the description of what a service must return.

A service must return XHTML to a given url, its main entrance is a cocoon pipeline that must return something like :

<html>

    <head>

        ...

    </head>

    <body>

        ...

    </body>

</html>


Title hierarchy

What about the title hierarchy ?

In a skin W3C and accessibility imply to respect the title hierarchy (h1, h2, h3...). When you are writing a service you do not know in which skin you will be called and moreover in which part of a skin.

We can suppose that if you are used in the top zone of a skin, your service should start with a h2, but if your are called in the middle you should start with a h3.

The solution is : do not care about this and always start your hierarchy with a h1

<html>

    <head>...</head>

    <body>

        <h1>My service name</h1>

        <h2>My service main part 1</h2>

        ...

        <h2>My service main part 2</h2>

        ...

    </body>

</html>

And this will be converted to the right hierarchy depending on where your are using it.

How ? That's because, the skin author, set a flag "level" on its zones to tell what offset use.

    <h1>My skin template</h1>

    <h2>Navigation part</h2>

    ...

    <h2>Content</h2>

    <zone level="3" name="default"/>

The level="3" attribute means that service title 1, will be converted to title 3.

You will then have the following result

    <h1>My skin template</h1>

    <h2>Navigation part</h2>

    ...

    <h2>Content</h2>

    <h3>My service name</h1>

    <h4>My service main part 1</h4>

    ...

    <h4>My service main part 2</h4>

    ...

Back to top