xml - Extract the value of namespace declaration using xpath -


i've got xml document 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 want use xpath(1.0) within xslt trasnfromation @ contents of either xmlns namespace attribute, or xsi:schemalocation attrubite, can strip out / recreate name of xsd file.

using:

/*/namespace::* 

gives me

http>//wwww.w3.org/xml/1998/namespace

but whatever try don't seem able actual contents of these attributes, ideas?

you should able query @schemalocation using /*/@xsi:schemalocation.

xmlns "attributes" namespaces declarations, not attributes. cannot query them such. /*/namespace::* works totally fine me. /* querying <document/> tag? xml namespace can set, did check all returned values?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -