xsl-list
[Top] [All Lists]

Re: [xsl] Resolve optional conref and apply another template

2022-01-17 16:50:02
On Mon, Jan 17, 2022 at 10:36:38PM -0000, rick(_at_)rickquatro(_dot_)com 
scripsit:
[snip]
I am not sure how to integrate the two templates so that I can convert
conref notes to tables too. Any pointers would be appreciated. Thank
you very much.

Generally speaking, when converting from an archival XML format to a
published representation, you'll have a regularization pass, a merge
pass, a processing pass, and a rendering pass. (Each of which might have
multiple stages!)

Conrefs should resolve in the merge pass.

Turning some notes into simple tables should happen in the processing
pass, so that template shouldn't ever see a conref.

Alternatively, if you're not using XSLT 1, you can resolve the conref
into a variable and apply-templates to the contents of the variable.
The problem with this approach is that it becomes a cruelty to
future-you, or anybody else who has to maintain the code.


-- 
Graydon Saunders  | graydonish(_at_)gmail(_dot_)com
Þæs oferéode, ðisses swá mæg.
-- Deor  ("That passed, so may this.")
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>