|
Subject: Re: [xsl] New camt54 namespace From: "Leo Studer leo.studer@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 12 May 2026 08:12:45 -0000 |
Thanks Martin Is there a possibility that xpath can access two namespaces simultaneously? Something like xpath-default-namespace=bns1, ns2b or xpath-default-namespace=bns1 | ns2b Thanks, L E O > On 12 May 2026, at 02:46, Martin Honnen martin.honnen@xxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > > > On 12/05/2026 02:16, Leo Studer leo.studer@xxxxxxxxxxx <mailto:leo.studer@xxxxxxxxxxx> wrote: >> The bank renewed the camt54 standard. >> >> In my stylesheet I need to access old and new bank statements simultaneously. >> >> With xpath-default-namespace="urn:iso:std:iso:20022:tech:xsd:camt.054.001.04b my stylesheet works for the old documents and >> with xpath-default-namespace="urn:iso:std:iso:20022:tech:xsd:camt.054.001.08b it does the job for the new documents. >> >> Is there an easy way to use either of the two namespaces so that my stylesheet works for old and new bank statements? >> >> > > Saxon allows you to set the -ns: command line option to e.g. -ns:urn:iso:std:iso:20022:tech:xsd:camt.054.001.04 see https://www.saxonica.com/html/documentation12/using-xsl/commandline/index.html > > > -ns:(uri|##any|##html5) > Defines the handling of unprefixed element names appearing as name tests in path expressions and match patterns in the stylesheet. > Supplying a URI sets the default namespace for elements and types (effectively a default value for xpath-default-namespace b note that an explicit value for this attribute takes precedence). > API wise Saxon allows you to use https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/s9api/Xslt Compiler.html#setDefaultElementNamespace(java.lang.String) and https://www.saxonica.com/html/documentation12/javadoc/net/sf/saxon/s9api/Xslt Compiler.html#setUnprefixedElementMatchingPolicy(net.sf.saxon.s9api.Unprefixe dElementMatchingPolicy) > > Thus if you use Saxon and run with the command line or with the s9api you can match on e.g. > > xsl:template match="foo" > > and with the -ns or the setDefaultElementNamespace you can choose the wanted namespace. > > XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list> > EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/945646> (by email <>)
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] New camt54 namespace, Martin Honnen martin | Thread | Re: [xsl] New camt54 namespace, Martin Honnen martin |
| Re: [xsl] New camt54 namespace, Martin Honnen martin | Date | Re: [xsl] New camt54 namespace, Martin Honnen martin |
| Month |