... for clarification, I can reproduce the behavior with stand-alone Saxon HE 
10.6 (but not in PE and EE).
Perhaps this needs to be addressed to Saxon then, since the documentation says 
"available in all editions"... still happy if anybody does have some helpful 
insights here.

Daniel

-----Ursprüngliche Nachricht-----
Von: Zimmel, Daniel <> 
Gesendet: Freitag, 29. April 2022 10:05
An: basex-talk@mailman.uni-konstanz.de
Betreff: Date picture and xslt:transform()

Hi,

why do I get different results with the following two queries?
xslt:transform() does not respect my date picture.

Expected result: 
        
        <root>29. März 2022</root>

Query 1:

        <root>{format-date(xs:date('2022-03-29'), '[D]. [MNn] [Y]', 'de', (), 
())}</root>
        
Result: 
        <root>29. März 2022</root>

Query 2:

declare namespace xsl = 'http://www.w3.org/1999/XSL/Transform';
let $xslt := <xsl:stylesheet version="3.0" 
                              xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
                              exclude-result-prefixes="xs">
              <xsl:template match="/">
                <root>
                  <xsl:sequence select="format-date(xs:date('2022-03-29'), 
'[D]. [MNn] [Y]', 'de', (), ())"/>
                </root>
              </xsl:template>  
            </xsl:stylesheet>
let $xml := <root/>

return
  for $xml in $xml
  return
    $xml => xslt:transform($xslt)

Result: 
        <root>[Language: en]29. March 2022</root>


Running the XSLT with Saxon EE (not in BaseX via xslt:transform) returns 
(correctly): 
        
        <root>29. März 2022</root>

Using BaseX 9.5

?

Daniel

Reply via email to