Doesn't build with clang 19. Diff below fixes it.
gentoo has the same workaround:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/xalan-c/files/xalan-c-1.12-gcc-15.patch
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/xalan-c/Makefile,v
diff -u -p -r1.6 Makefile
--- Makefile 14 Feb 2025 18:27:16 -0000 1.6
+++ Makefile 16 Feb 2025 10:40:17 -0000
@@ -3,7 +3,7 @@ COMMENT = XML/XSLT library
V = 1.12
DISTNAME = xalan_c-$V
PKGNAME = xalan-c-$V
-REVISION = 1
+REVISION = 2
SHARED_LIBS += xalan-c 0.0 # 0.0
SHARED_LIBS += xalanMsg 0.0 # 0.0
Index: patches/patch-src_xalanc_XMLSupport_XalanOtherEncodingWriter_hpp
===================================================================
RCS file: patches/patch-src_xalanc_XMLSupport_XalanOtherEncodingWriter_hpp
diff -N patches/patch-src_xalanc_XMLSupport_XalanOtherEncodingWriter_hpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_xalanc_XMLSupport_XalanOtherEncodingWriter_hpp 16 Feb
2025 10:32:43 -0000
@@ -0,0 +1,59 @@
+Fix build with clang 19 by removing never instantiated function
+that doesn't compile:
+
+/tmp/pobj/xalan-c-1.12/xalan_c-1.12/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp:323:31:
error: no member named 'm_isPresentable' in
'XalanOtherEncodingWriter<Predicate, ConstantsType>'
+ 323 | if (this->m_isPresentable(value))
+ | ~~~~ ^
+/tmp/pobj/xalan-c-1.12/xalan_c-1.12/src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp:329:31:
error: no member named 'writeNumberedEntityReference' in
'XalanOtherEncodingWriter<Predicate, ConstantsType>'
+ 329 | this->writeNumberedEntityReference(value);
+ | ~~~~ ^
+1 warning and 2 errors generated.
+
+Index: src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp
+--- src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp.orig
++++ src/xalanc/XMLSupport/XalanOtherEncodingWriter.hpp
+@@ -302,44 +302,6 @@ class XalanOtherEncodingWriter : public XalanFormatter
+ }
+
+ void
+- writeSafe(
+- const XalanDOMChar* theChars,
+- size_type theLength)
+- {
+- for(size_type i = 0; i < theLength; ++i)
+- {
+- const XalanDOMChar ch = theChars[i];
+-
+- if (isUTF16HighSurrogate(ch) == true)
+- {
+- if (i + 1 >= theLength)
+- {
+- throwInvalidUTF16SurrogateException(ch, 0,
getMemoryManager());
+- }
+- else
+- {
+- XalanUnicodeChar value = decodeUTF16SurrogatePair(ch,
theChars[i+1], getMemoryManager());
+-
+- if (this->m_isPresentable(value))
+- {
+- write(value);
+- }
+- else
+- {
+- this->writeNumberedEntityReference(value);
+- }
+-
+- ++i;
+- }
+- }
+- else
+- {
+- write(static_cast<XalanUnicodeChar>(ch));
+- }
+- }
+- }
+-
+- void
+ write(const XalanDOMChar* theChars)
+ {
+ write(theChars, XalanDOMString::length(theChars));