XPointer

9 views
Skip to first unread message

Rob Beezer

unread,
Dec 20, 2025, 6:20:09 PM (4 days ago) Dec 20
to prete...@googlegroups.com
How do we feel about XPointer on an #xi:include? Looks like it could solve an
xi:include problem with STACK questions (see related thread). I know some
folks have looked into it to address various other problems. Seems to have not
gotten past a "recommendation" twenty-two years ago. I've yet to seriously
experiment.

https://en.wikipedia.org/wiki/XPointer

Reliable? Supported? Amenable to a long-term commitment? Red flags?

Thanks,
Rob

Alex Jordan

unread,
Dec 20, 2025, 9:21:05 PM (3 days ago) Dec 20
to prete...@googlegroups.com
It worked for me at least in the narrow case of identifying an element by @xml:is, using pretext/pretext/pretext. 

I could not use jing for validation though. It seems like something risky to officially bake into pretext.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyNi5iZWV6ZXI.1766272806%40pnsh.

Oscar Levin

unread,
Dec 20, 2025, 10:42:46 PM (3 days ago) Dec 20
to PreTeXt development
Here is what I learned looking into xpointers a while back (see https://groups.google.com/g/pretext-dev/c/ns2ZJtEMAcY/m/9HVsiTFwAAAJ).

"lxml (and xsltproc) handle xpointer="xpointer(...)" just fine, but I think this is the only xsl processing software that has implemented the xpointer language; the langue is only a W3C draft (since 2001).  However, the xpointer framework, that allows you to have an `@xpointer`, and the `element(...)` mechanism are W3C recommendations, so have broad support.  It appears that the only real downside to only recommending use of `element()` or just a bare xml:id as the value of the `@xpointer` is that you need to always have an xml:id, rather than just referring to types of elements."

So depending on how you reference the part of the file you are including, you are getting a robust and supported system.  

Reply all
Reply to author
Forward
0 new messages