xml:base not allowed

36 views
Skip to first unread message

Valerio Monti

unread,
Jun 9, 2026, 3:29:31 AM (10 days ago) Jun 9
to PreTeXt support
Hi,
I recently validated my project against the schema version which comes with Pretext-CLI 2.41.2 and I got several errors (one for every file in my project)

error: attribute "xml:base" not allowed here; expected attribute "component", "label" or "xml:lang"

In the source I have something like this

<frontmatter xml:id="frontmatter" xmlns:xi="http://www.w3.org/2001/XInclude">

It seems to be related to this commit

https://github.com/PreTeXtBook/pretext/commit/a62ee9214890fad5d934190520edd11bcfaa63ef

Should I modify the source in some way to pass the validation? Building of the output is apparently not affected, so it is not a big issue.

All the best, 
Valerio

Rob Beezer

unread,
Jun 9, 2026, 1:43:56 PM (9 days ago) Jun 9
to pretext...@googlegroups.com
Dear Valerio,

You caught me out, with the cart before the horse.

During "assembly" (our pre-processor), we are stripping out the @xml:base
attributes (which as you surmise, are a result of #xi:include). So I was able
to remove any mention of these in the schema. The cart.

So we need to run validation on the result of the (early) "version" pass (not
orignal source). I need to automate this better, another related unfinished
task. The horse.

Why did I do this? I was in a rush to have the Guide validate! We allowed
@xml:base in "stategic" locations, via the schema, but that was an imperfect
approximation, that was never really going to be right. Isn't it funny how the
desire to fully validate is a deep-seated human reaction?

And if you use support for versions, you run a real risk of totally violating
the schema, until the version gets resolved. So the need to perform validation,
post-version resolution, is completely necessary and mostly independent of this
#xi:include stuff.

If we ever need the *values* of the @xml:base, we can add them back in with our
own "private" attributes.

Short answer: those violations right now are meaningless, and we have a plan
where soon you won't see them.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/6e28f7a1-5a3b-4077-9092-52dd6b3a9b5cn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-
> support/6e28f7a1-5a3b-4077-9092-52dd6b3a9b5cn%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Valerio Monti

unread,
Jun 10, 2026, 1:27:40 AM (9 days ago) Jun 10
to PreTeXt support
Thank you, Rob.
Reply all
Reply to author
Forward
0 new messages