Project

Profile

Help

Unexpected language:en in .NET API output

Added by Anonymous about 15 years ago

Legacy ID: #7649420 Legacy Poster: Dieter (dietermenne)

When I process a data with format-dateTime($last,'[D,2].[M,2].[Y]') from Stylus/Saxon 9.0.0.2/XSLT 2.0, I get the expected result. When processing the same with .NET API (latest version, downloaded yesterday), an unexpected [language:en] 20.01.1949 is inserted. What's wrong? Dieter


Replies (2)

RE: Unexpected language:en in .NET API output - Added by Anonymous about 15 years ago

Legacy ID: #7649704 Legacy Poster: Michael Kay (mhkay)

It looks like this bug: https://sourceforge.net/tracker/?func=detail&aid=2837292&group_id=29872&atid=397617 Although you haven't explicitly requested a language in the call of format-dateTime(), it's defaulting to the language of your Java locale, which is presumably non-English. This will be fixed in the next maintenance release. In the meantime, since your date format is not language-dependent, you can circumvent the bug by requesting language "en" in the language parameter to format-dateTime(). Sorry about the inconvenience.

RE: Unexpected language:en in .NET API output - Added by Anonymous about 15 years ago

Legacy ID: #7649811 Legacy Poster: Dieter (dietermenne)

Thanks, Michael I was just reading page 781 and trying the same when I got your message. I also had to add an explicit "ISO", otherwise I get a "calendar AD" even in 9.0.0.2. Sigh... How can anyone write such a book as XSLT 2.0 within a lifespan. I stands out like a rock in the sometimes a bit rushed WROX-edition. Minor point: "square brackets" in the subset context and "subset" are not indexed. Dieter

    (1-2/2)

    Please register to reply