xsl-list
[Top] [All Lists]

Re: [xsl] Weird problem with doc()

2022-05-30 15:01:47
That worked, thanks so much! 

I am overriding code that I don't know much about, but it is converting and 
merging XHTML, and indeed, at the top the stylesheet I'm overriding it has this 
attribute:

xpath-default-namespace="http://www.w3.org/1999/xhtml";

So I pulled down from my shelf the big fat book by Mr. Kay[1] and looked up 
this attribute. Page 480 has a nice description of this problem and a fix. So I 
changed to the null namespace on my xsl:message element like this and now XPath 
will read successfully from my non-namespaced external file:

 FTITLE: 

(if that doesn't come through because of angle brackets, here it is without 
them:)
xsl:message xpath-default-namespace="" FTITLE:  xsl:value-of 
select="$testxml//ishfield[@name='FTITLE']" /  /xsl:message 

Thanks very much!
Mark
 
-----Original Message-----
From: 
Sent: May 30, 2022 12:07 AM
To: xsl-list 
Subject: Re: [xsl] Weird problem with doc()
 
 
 
On 30 May 2022, at 08:02, Imsieke, Gerrit, le-tex 
gerrit(_dot_)imsieke(_at_)le-tex(_dot_)de wrote:

I suspected a namespace issue, too, but the ishobjects XML seems to be in no 
namespace, see for example 
https://www.oxygenxml.com/forum/post55006.html#p55006


 
So check for an xpath-default-namespace declaration, which would stop the code 
working on no-namespace input.
 
Michael Kay
Saxonica

 

 
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--


<Prev in Thread] Current Thread [Next in Thread>