#219 Allow @target (or <ptr/>) on divGen

AMBER
closed
nobody
5
2010-04-29
2010-03-19
David Sewell
No

A request to add @target to the content model for <divGen>. This would be a clean way to provide a quasi-XInclude functionality for <divGen>, in cases where XInclude is not feasible for one reason or another.

(We have a real-world use case in the need to enable dynamic includes within TEI pages on www.tei-c.org, where we would like to be able to do

<divGen type="xinclude" target="http://some.URL"/>

as the back end XSLT parser doesn't do XInclude. )

Discussion

  • David Sewell
    David Sewell
    2010-03-21

    James Cummings thinks he had once proposed to allow <ptr/> inside <divGen>. That would accomplish the same thing and would leverage the existing functionality of <ptr/> quite appropriately.

     
  • David Sewell
    David Sewell
    2010-03-21

    • summary: Allow @target on divGen --> Allow @target (or <ptr/>) on divGen
     
  • Lou Burnard
    Lou Burnard
    2010-04-07

    Why can't this be done with xInclude? Why do we want a "quasi Xinclude" facility when we re commend the real thing (tm)?

     
  • Lou Burnard
    Lou Burnard
    2010-04-07

    • milestone: --> AMBER
     
  • David Sewell
    David Sewell
    2010-04-07

    "the back end XSLT parser doesn't do XInclude" per original request

    So the alternative is to write a template to match the XInclude element in the current XSLT stylesheet. That would work but it's sort of a hack. As <divGen> is inherently a pointing sort of thing (it is not self-contained but has meaning only as the result of instructions or content found elsewhere), a @target attribute would just expand the options for "finding elsewhere".

     
  • Lou Burnard
    Lou Burnard
    2010-04-29

    • status: open --> closed
     
  • Lou Burnard
    Lou Burnard
    2010-04-29

    Councilagrees that the right mechanism for this purpose is xInclude, even though openCMS may not support this directly.

     
  • David Sewell
    David Sewell
    2010-04-29

    OK. If anyone knows of a CMS that fully supports XSLT 2.0 with XInclude, let me know. :-)

    David

     
  • Syd Bauman
    Syd Bauman
    2010-04-29

    On the face of it, request for target= seems reasonable, request for <ptr> seems reasonable but harder both to define and to deal with.

    Let's presume for a moment that the only two kinds of processing there are for <divGen>s are
    1) generate a TOC or similar such thing by reading current document, and
    2) get that XML file over there, stuff it in here

    Clearly <xi:include> isn't useful for the first, so that has to be <divGen>. But now if I have both kinds in my document, I would have to use <divGen> for one and <xi:include> for the other? Seems a bit clumsy.

    But more importantly, those are not the only two kinds of generate-a-<div> processing TEI users may wish to employ. One can imagine, e.g., a system for which the processor, when it finds a <divGen type="xproc" subtype="generateFirstLineIndex" target="http://www.example.edu/famousPoems/"> sends each XML file found at the target= directory through the XProc indicated by the subtype=, and replaces the <divGen> element with the results.

    Just a thought.