Re: Proposal: has-name-match()
"\"John L. Clark\"" <[email protected]> Mon, 22 Jan 2007 14:02:08 -0500
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
On 1/22/07, Derose, Steve (NIH/NLM/NCBI) [C] <[email protected]> wrote: > Could you describe some use-cases you have in mind? Perhaps I'm being > dense, but I don't see the general application.... Typically I would do > similar things by qualifying the template's match parameter, but I can > imagine there might be cases where that's not feasible. Initially, I was thinking about using this outside of XSLT (specifically, in XForms), but I think it might have some value within XSLT (although one could easily implement it using the EXSLT `func:function` extension). I was thinking about using this function for node-set templating. That is, I would store templates for nodes in one location, and then dispatch them as needed based upon context. For example, say you created a new node that matched the XSLT Pattern "some/target/node" and you wanted to populate "node" with some initial content. You might have a template section that also contained "some/target/node" (with its initial content), and you could then match it against your current node with the `has-name-match()` function. I don't know, is this too far-fetched? I'll try to brainstorm some additional possible use-cases. Thanks for keeping me honest! Take care, John L. Clark