Hi Eliot,
Thanks for the observation, a bug fix is available [1,2].
Best, Christian
[1] https://files.basex.org/releases/latest/ [2] https://github.com/BaseXdb/basex/issues/2227
On Fri, Jul 7, 2023 at 12:48 AM Eliot Kimber eliot.kimber@servicenow.com wrote:
This XQuery demonstrates the problem:
(:--------:) let $xmlBaseAtt as attribute() := attribute {'xml:base'}{'/foo/bar.xml'}
let $transformed1 as element() :=
try {
$doc1 transform with { insert node $xmlBaseAtt into .}
} catch * {
<error code="{$err:code}" desc="{$err:description}" object="doc1"/>
}
let $transformed2 as element() :=
try {
$doc2 transform with { insert node $xmlBaseAtt into .}
} catch * {
<error code="{$err:code}" desc="{$err:description}" object="doc2"/>
}
return (
``[No @base attribute:]``
,$transformed1
,``[Has @base attribute:]``
,$transformed2
,()
)
(:--------:)
The results I get with 10.6 are:
No @base attribute:
<root xml:base="/foo/bar.xml"/>
Has @base attribute:
<error code="err:XUDY0021" desc="Duplicate attribute name: xml:base." object="doc2"/>
It looks like the transform processor is matching @xml:base to @base even though they are different attributes.
Is this a bug or is there a different way I should be specifying the @xml:base attribute?
This is an issue because @base is a DITA-defined attribute that occurs on elements on which I need to set @xml:base (which is how I found the problem).
Cheers,
Eliot
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
servicenow.com
LinkedIn | Twitter | YouTube | Facebook