1
votes

I've got an XML document with the declaration

<Document xmlns="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.008.001.04 file://BE-FILE01/tverschu$/SR%20(Standards%20Release)/SR2013/ISO/Payments%20Initiation/SR2013_MX_Schemas_PaymentsInitiation/pain.008.001.04.xsd">

Effectively I want to use XPath(1.0) within an XSLT trasnfromation to get at the contents of either the xmlns namespace attribute, or the xsi:schemaLocation attrubite, so I can strip out / recreate the name of an xsd file.

using:

/*/namespace::*

gives me

http>//wwww.w3.org/XML/1998/Namespace

but whatever I try I don't seem able to get the actual contents of these attributes, any ideas?

1

1 Answers

1
votes

You should be able to query @schemaLocation using /*/@xsi:schemaLocation.

xmlns "attributes" are namespaces declarations, not attributes. You cannot query them as such. /*/namespace::* works totally fine for me. Is /* querying the <Document/> tag? The xml namespace can always set, did you check all returned values?