On 7/3/24 14:16, D. Brian Walton wrote:
> Separately,
I've renamed the thread for this very different topic.
Likely it is
<xsl:apply-templates select="*"/> (elements only)
versus
<xsl:apply-templates/> (elements and text)
the latter being functionally equivalent to
<xsl:apply-templates select="*|text()"/>
> Is there an efficient way in the pre-processor stage to look for #feedback with
> naked text and surround it? Would #p be the most natural element to enclose
> things in?
Mixed-content (elements and text nodes as peers) is tough. But not relevant
here. Structured is great, which is the expectation for #feedback right now, I
believe. It would be nice to allow source to be (short) unstructured text and
have the pre-processor provide a #p as a wrapper, and the code can then assume
structure always (e.g select="*").
The problem is how to reliably identify the difference between the unstructured
and structured versions? Not as easy as you think.
<feedback>
<em>I love</em> <c>Python.</c>
</feedback>
Only cheating a bit with the period.
Read recent pull request with Andrew S to allow naked code in a #program. Easy
there, a structured version (current expectation) is it *must* have an "input".
So the structured/unstructured signal is clear.
Having said all that, we have code for structured/unstructures list items (not
in pre-processor), and I think current code makes me a bit nervous.
Rob