Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compatibility with Mvp.Xml 2.3.0 #41

Closed
flyingpie opened this issue Dec 18, 2023 · 4 comments
Closed

Backwards compatibility with Mvp.Xml 2.3.0 #41

flyingpie opened this issue Dec 18, 2023 · 4 comments
Labels

Comments

@flyingpie
Copy link

Describe the Bug

Some of the methods provided by Mvp.Xml 2.3.0 have effectively been removed, by changing the casing of these methods.

It's not clear to me if this is by design, as part of the v2 -> v3 major version upgrade. I understand if it is, but I'd like to know whether it was on purpose, and whether you'd be open to merging in backwards-compatible methods.

image

Steps to Reproduce

The following template used to work with 2.3.0, but doesn't with 3.0.0+, due to "dateTime()" being renamed to "DateTime()".

I understand that the preferred method is "date-time()", so I'm asking about your thoughts regarding the backwards compat.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:date="http://exslt.org/dates-and-times">

  <xsl:template match="/">
    <root>
      <xsl:value-of select="date:dateTime()" />
    </root>
  </xsl:template>
</xsl:stylesheet>

Expected Behavior

XSL templates that were made to work with 2.3.0 still work in 3.1.0.

Exception with Stack Trace

System.Xml.Xsl.XslTransformException: Extension object 'http://exslt.org/dates-and-times' does not contain a matching 'dateTime' method that has 0 parameter(s).

Version Info

3.0.0+

@flyingpie flyingpie added the bug label Dec 18, 2023
@kzu
Copy link
Member

kzu commented Feb 15, 2024

Hm.... it seems to me that the current code is actually compliant with the EXSLT spec:

image

https://exslt.github.io/date/index.html

Might not be a bad thing to actually NOT introduce incompatible function names that make your XSLTs less portable. Thoughts?

@kzu kzu added question and removed bug labels Feb 15, 2024
@flyingpie
Copy link
Author

@kzu Yeah, I can totally understand that. My main concern was that it does possibly break previously working stuff (as it does in our case), so at least there could be a note in the release notes or something.

To what degree is backwards-compatibility with Mvp.Xml 2.x a concern for you?

@kzu
Copy link
Member

kzu commented Feb 19, 2024

Not much, since there isn't much new stuff between 2.x and 3.x other than overall modernization. So I don't think it's a large drawack (iow, you're not missing much) to staying with 2.x 🤔

I'll add a note to the release notes anyway.

@kzu
Copy link
Member

kzu commented Feb 19, 2024

Updated release notes: https://github.com/devlooped/Mvp.Xml/releases/tag/v3.1.0

@kzu kzu closed this as completed Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants