jakartaee / batch

The Jakarta Batch project produces the Batch Specification and API.
https://projects.eclipse.org/projects/ee4j.batch
Apache License 2.0
13 stars 17 forks source link

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

Open chengfang opened 2 years ago

chengfang commented 2 years ago

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">
scottkurz commented 2 years ago

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.)

chengfang commented 2 years ago

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.