kinkofer / FightClub5eXML

Creating XML files of all D&D sources compatible with Fight Club 5e and Game Master 5e apps for iOS and Android.
MIT License
706 stars 395 forks source link

More flexible XSLT merge (not a PR, but with code) #147

Closed ebullient closed 1 year ago

ebullient commented 3 years ago

I have an attempt at a different XSLT that reduces duplication.. https://github.com/ebullient/FightClub5eXML/blob/ddice-uvms/Utilities/uvms-merge.xslt

I hesitate making a PR for it, because it is somewhat adventurous, but I'm trying to allow more places for me to add additional content or modify/tweak/change behavior to suit my own conventions.

XSLT is god-awful stuff, but I've managed to get dice rolls sorted and de-duplicated always. Spell classes are similarly always sorted and de-duplicated, which could help with #136 and #111

For people that always want to be able to append their own notes, this can lead the way for that: if you added a custom attribute to "your" content, the XSLT could always append that content at merge time (and remove the attribute).

HTH