forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: cvs commit: xml-forrest/src/resources/skins/common/xslt/html document2html.xsl
Date Sun, 12 Jan 2003 07:54:55 GMT
On Sun, Jan 12, 2003 at 06:04:28AM +0100, Steven Noels wrote:
> Jeff Turner wrote:
> 
> >Heheh.. well, it's.. more logical than generate-id() output.. and a good
> >inspiration for finding a better solution :)  I'm currently experimenting
> >with a transformer to add @ids.
> 
> There's a twisted little 'rightness' behind this xPointer idea, though - 
>  it works for any element in the document, and strangely enough, there 
> is something I read somewhere which states that the high-level 
> _structure_ of documents don't change that much.

Yes, but it mixes concerns, because the address is for the content, which
the presentation theoretically shouldn't expose.

> For your transformer, 
> don't forget to think about:
> 
> <section>
>   <title>Introduction</title>
>   <p>foobar</p>
>   <section>
>     <title>Operational constraints</title>
>     <section>
>       <title>Introduction</title>
>     </
>   </
> </

It's all done with XPath:

<map:transform type="idgen">
  <map:parameter name="element" value="/document/body//*[local-name() = 'section']"/>
  <map:parameter name="id" value="*[1]/text()"/>
</map:transform>


--Jeff

> </Steven>
> -- 
> Steven Noels                            http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at            http://blogs.cocoondev.org/stevenn/
> stevenn at outerthought.org                stevenn at apache.org
> 

Mime
View raw message