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

Use 'jakartaee' namespace prefix in job.xsd and batch.xsd (the convention used by other Jakarta specs). #203

Open
chengfang opened this issue Jun 30, 2022 · 2 comments
Labels
enhancement Requests for improvements to tests

Comments

@chengfang
Copy link
Contributor

chengfang commented Jun 30, 2022

https://jakarta.ee/xml/ns/jakartaee/batchXML_2_0.xsd
https://jakarta.ee/xml/ns/jakartaee/jobXML_2_0.xsd

batch xsd uses the non-standard namespace jbatch. It should be changed to the standard one jakartaee:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jbatch="https://jakarta.ee/xml/ns/jakartaee" elementFormDefault="qualified" targetNamespace="https://jakarta.ee/xml/ns/jakartaee" version="2.0">
<xs:element name="batch-artifacts" type="jbatch:BatchArtifacts"/>
<xs:complexType name="BatchArtifacts">
<xs:sequence>
<xs:element name="ref" type="jbatch:BatchArtifactRef" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BatchArtifactRef">
<xs:attribute name="id" use="required" type="xs:string"/>
<xs:attribute name="class" use="required" type="xs:string"/>
</xs:complexType>
</xs:schema>

job xsd uses the non-standard namespace jsl, and should be changed to the standard one jakartaee:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:jsl="https://jakarta.ee/xml/ns/jakartaee" 
elementFormDefault="qualified" 
targetNamespace="https://jakarta.ee/xml/ns/jakartaee" version="2.0">

This is the convention used by other Jakartaee schemas, such as web-app_6_0.xsd:

<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" 
xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
targetNamespace="https://jakarta.ee/xml/ns/jakartaee" 
elementFormDefault="qualified" attributeFormDefault="unqualified" version="6.0">
@chengfang chengfang added the enhancement Requests for improvements to tests label Jun 30, 2022
@scottkurz
Copy link
Contributor

I added the word 'prefix' in the issue title to clarify that we are in fact using the standard namespace as the targetNamespace of our batch-related schema definitions, and that you're only suggesting we also use the conventional prefix.

I'm curious if you envision this mattering in any kind of real-world document ? E.g. some XML document that "embeds" both a job definition and other EE stuff.

Or are you just noting the convention which we might as well conform to? In which case, I wonder, can we keep the existing prefixes and add the new conventional one? (I'd guess you can but would have to consult the XML/XSD specs, etc.)

@scottkurz scottkurz changed the title Use standard namespace in job.xsd and batch.xsd Use 'jakartaee' namespace prefix in job.xsd and batch.xsd (the convention used by other Jakarta specs). Jul 5, 2022
@chengfang
Copy link
Contributor Author

I think this issue is more about documentation and internal impl of the schema. I haven't seen such non-standard prefix show up in any applications, nor any application xml files containing elements from multiple EE component schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests for improvements to tests
Projects
None yet
Development

No branches or pull requests

2 participants