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

Create transforms for batch XML (and other XMLs using updated Jakarta EE 9 XSDs?) #73

Closed
scottkurz opened this issue Jun 22, 2020 · 3 comments
Labels

Comments

@scottkurz
Copy link

scottkurz commented Jun 22, 2020

For Jakarta Batch, I was wondering about rule(s) that would transform XML from the Java/Jakarta EE 8 XSD to the Jakarta EE 9 format.

A typical transform of a batch job XML file would require:

  1. namespace substitution JCP->Jakarta
  2. Update of the @version attribute on the top-level <job> element, 1.0=>2.0.

E.g., from job_batchlet_1step.xml in the TCK:

-<job id="job_batchlet_1step" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
+<job id="job_batchlet_1step" xmlns="https://jakarta.ee/xml/ns/jakartaee" version="2.0">

(Note also if you look at the latest: https://jakarta.ee/xml/ns/jakartaee/#9 you won't see the version bump to 2.0 I mentioned, since it's still "in the pipeline".. but it seemed worth opening the issue now anyway).

One challenge here is that Batch doesn't have a well-known filename or pattern that could go in jakarta-text-master.properties like web-fragment.xml. Not sure a good way to address that.

This type of transform would probably be useful for other EE XML files with similar XSD updates. So some others would have the same NS transform but with different "version" transforms than the batch job XML example.

In addition Batch has a second XML schema, "batch.xml" which is simpler, and only requires a NS transform, not a version bump.

I think this could probably be done with "glob" matching: <job*version="1.0"*> => <job*version="2.0"*> though perhaps something more structured like regex or XPath would be better (e.g. since in XML you can use single or double quotes).

@tbitonti tbitonti added the enhancement New feature or request label Jun 23, 2020
@scottkurz scottkurz changed the title Create transforms for batch XML (and other XMLs using update XSDs?) Create transforms for batch XML (and other XMLs using updated Jakarta EE 9 XSDs?) Jun 23, 2020
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot removed the stale label May 11, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@github-actions github-actions bot added the stale label May 12, 2023
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

This issue has been automatically closed due to inactivity. If you can reproduce this or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2023
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