I have XML / TEI documents and I am writing XSLT 2.0 to extract their contents.
Almost all TEI documents do not have a namespace, but one has a default namespace ( xmlns="http://www.tei-c.org/ns/1.0"). Thus, all documents have the same aspect with fuzzy tags like <TEI>or <teiHeader>, but if I try to extract the contents, everything works with "non-namespaced-documents", but nothing (of course) is extracted from the name-document space.
So, I used the attribute xpath-default-namespace="http://www.tei-c.org/ns/1.0"and now (of course) the only document that works with names.
I cannot edit documents at all, so I ask if there is a way to dynamically change the xpath-default namespace to make xpaths work //teiHeaderas with both files with and without names
Mycol source
share