Re: Dom Transformer

"Mark H. Wood" <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <[email protected]>
On Fri, Mar 15, 2013 at 02:58:37PM -0400, Mansour Al Akeel wrote:
> I have tags with id's like:
> 
> <some-section-tag id='109876_n00069" .... >
> 
> And those ids are used for links inside the document. They are linked
> from different sections.
> I like to transform the links and the ids to something that makes sense. Like,
> 
> <xref href="the-section-title-with-dashes-only" > My Link Label</xref>
> 
> And
> 
> The anchor
> 
> <some-section-tag id='the-section-title-with-dashes-only" .... >
> 
> I think this can be done is Stax, xslt or Sax, however, I am trying to
> do it in a clean way without any hacks.
> 
> Do you have any suggestion ??

I well understand the appeal of keeping the whole document around for
random access. :-) But have you considered xsl:key?  It sound like you
want to accumulate a symbol table and fetch useful properties of the
symbols when you see them again.

I'm only brainstorming here.  I haven't yet used xsl:key myself.  But
if I don't expose my ignorance once in a while, I'll never learn. :-)
If you find my suggestion helpful, I'd like to see how you used it.

-- 
Mark H. Wood, Lead System Programmer   [email protected]
There's an app for that:  your browser
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEAREIAAYFAlFDelIACgkQs/NR4JuTKG8CrACggbpSO2zB7stvuTKrKlELb+1m
cMEAni2zk+7P8WHZmtsGWeMUCBtqTUMF
=Iu67
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.