Skip to content

Conversation

@Alex-Jordan
Copy link
Contributor

…over to its static sidebyside

This is discussed in #2618.

Among the PRs I expect to open and update this week, first to evaluate can be this one or #2739, in either order.

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 18, 2025

If the source interactive does not have an @xml:id this is going to make an attribute on the sidebyside that has an empty value. Then, that will wreak havoc with the various auto-generated id's.

This is confirmed by testing before/after diffs with the assembly-static format, as should be part of a change like this.

Please make the "new" attribute conditional on having an "old" attribute. And a code comment indicating necessity would be useful, so nobody messes with this unawares. Thanks.

@Alex-Jordan
Copy link
Contributor Author

I wondered about this when making the change, but something made me think it would not be an issue. I was searching for how this was done elsewhere, and at line 879, the same thing is done for a biblio. It made me think this must be OK to end up with @xml:id="".

I'll make the change here. Mentioning the biblio instance in case you feel that is worth changing too.

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 19, 2025

Thanks for the pointer to biblio. A biblio is largely useless without an @xml:id since you should reference it via an @ref.. But I guess people will make biblio in a references just for show.

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 19, 2025

Maybe try

<xsl:copy-of select="@xml:id"/>

which might do the desired thing.

@Alex-Jordan
Copy link
Contributor Author

OK, this has your suggestion to use copy-of. I did not know about assembly-static, good to know. I used it now, and it seems the before/after diff hits about 80 instances of a change using the sample article. The changes are hard to read, because once the parent sidebyside has an author-generated xml:id, then its unique-id changes. So then all of the descendant unique-ids change, and that clutters the diff. But aside from that, they seem to hit the right things. There are no instances of xml:id="".

The before sidebyside has only a unique-id. The after sidebyside has a (different) unique-id, a (new, expected) xml:id, and also a label. Should I be expecting the label to pop up out of this too?

@rbeezer
Copy link
Collaborator

rbeezer commented Dec 19, 2025

There are no instances of xml:id="".

I think that is the important thing. All the clutter is to be expected.

Should I be expecting the label to pop up out of this too?

Couldn't hurt. And will mask an @xml:id if an author doesn't want them to bleed into output. I'll see about adding it as part of a review.

rbeezer pushed a commit that referenced this pull request Dec 19, 2025
@rbeezer
Copy link
Collaborator

rbeezer commented Dec 19, 2025

I added in the copy of @label, plus added the requested code comment. Thanks for firming this up.

@rbeezer rbeezer closed this Dec 19, 2025
@rbeezer
Copy link
Collaborator

rbeezer commented Dec 19, 2025

And I fixed up the biblio version at 2f2c5c2. Thanks for pointing that one out.

mitchkeller pushed a commit to mitchkeller/pretext that referenced this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants