This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 6aa17b7  Update the `log4j-docgen` schema namespace[1] and location[2]
6aa17b7 is described below

commit 6aa17b7e1318e9af9854f76ac50a15087aee9529
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Wed Feb 28 11:20:35 2024 +0100

    Update the `log4j-docgen` schema namespace[1] and location[2]
    
    [1] https://logging.apache.org/xml/ns
    [2] https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd
---
 .../org/apache/logging/log4j/docgen/generator/SchemaGenerator.java   | 5 ++++-
 log4j-docgen/src/main/mdo/plugins-model.xml                          | 3 ++-
 .../org/apache/logging/log4j/docgen/generator/base-java-types.xml    | 5 ++++-
 .../org/apache/logging/log4j/docgen/generator/base-log4j-types.xml   | 5 ++++-
 log4j-docgen/src/test/resources/example-plugins.xml                  | 5 ++++-
 log4j-docgen/src/test/resources/generated-plugins.xml                | 5 ++++-
 log4j-docgen/src/test/resources/generated-plugins.xsd                | 2 +-
 7 files changed, 23 insertions(+), 7 deletions(-)

diff --git 
a/log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/generator/SchemaGenerator.java
 
b/log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/generator/SchemaGenerator.java
index 4e6aa60..6381f55 100644
--- 
a/log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/generator/SchemaGenerator.java
+++ 
b/log4j-docgen/src/main/java/org/apache/logging/log4j/docgen/generator/SchemaGenerator.java
@@ -51,10 +51,12 @@ public final class SchemaGenerator {
 
     private static final String LOG4J_PREFIX = "log4j";
 
-    private static final String LOG4J_NAMESPACE = 
"http://logging.apache.org/xml/ns/config";;
+    private static final String LOG4J_NAMESPACE = 
"https://logging.apache.org/xml/ns";;
 
     private static final String XSD_NAMESPACE = 
XMLConstants.W3C_XML_SCHEMA_NS_URI;
 
+    private static final String VERSION = new PluginSet().getSchemaVersion();
+
     private static final String MULTIPLICITY_UNBOUNDED = "*";
 
     private static final String CHARSET_NAME = "UTF-8";
@@ -93,6 +95,7 @@ public final class SchemaGenerator {
         writer.writeNamespace(LOG4J_PREFIX, LOG4J_NAMESPACE);
         writer.writeAttribute("elementFormDefault", "qualified");
         writer.writeAttribute("targetNamespace", LOG4J_NAMESPACE);
+        writer.writeAttribute("version", VERSION);
 
         // The root element
         writer.writeEmptyElement(XSD_NAMESPACE, "element");
diff --git a/log4j-docgen/src/main/mdo/plugins-model.xml 
b/log4j-docgen/src/main/mdo/plugins-model.xml
index 0354bcc..fcefd0b 100644
--- a/log4j-docgen/src/main/mdo/plugins-model.xml
+++ b/log4j-docgen/src/main/mdo/plugins-model.xml
@@ -17,7 +17,8 @@
   -->
 <model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns="http://codehaus-plexus.github.io/MODELLO/2.0.0";
        xsi:schemaLocation="http://codehaus-plexus.github.io/MODELLO/2.0.0 
https://codehaus-plexus.github.io/modello/xsd/modello-2.0.0.xsd";
-       xml.namespace="https://logging.apache.org/xml/ns/plugins";>
+       xml.namespace="https://logging.apache.org/xml/ns";
+       
xml.schemaLocation="https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd";>
     <id>plugins</id>
     <name>PluginBundle</name>
     <description>Documents a set of Log4j plugins.</description>
diff --git 
a/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-java-types.xml
 
b/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-java-types.xml
index 0dd93bc..f6fed10 100644
--- 
a/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-java-types.xml
+++ 
b/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-java-types.xml
@@ -15,7 +15,10 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<pluginSet xmlns="https://logging.apache.org/xml/ns/plugins"; version="0.1.0">
+<pluginSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+           xmlns="https://logging.apache.org/xml/ns";
+           xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd";
+           version="0.1.0">
 
   <description>Java type definitions untraceable from the plugin 
hierarchy.</description>
 
diff --git 
a/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-log4j-types.xml
 
b/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-log4j-types.xml
index 5a3d1de..56571f9 100644
--- 
a/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-log4j-types.xml
+++ 
b/log4j-docgen/src/main/resources/org/apache/logging/log4j/docgen/generator/base-log4j-types.xml
@@ -15,7 +15,10 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<pluginSet xmlns="https://logging.apache.org/xml/ns/plugins"; version="0.1.0">
+<pluginSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+           xmlns="https://logging.apache.org/xml/ns";
+           xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd";
+           version="0.1.0">
 
   <groupId>org.apache.logging.log4j</groupId>
   <artifactId>log4j-core</artifactId>
diff --git a/log4j-docgen/src/test/resources/example-plugins.xml 
b/log4j-docgen/src/test/resources/example-plugins.xml
index 0edf04c..b610c00 100644
--- a/log4j-docgen/src/test/resources/example-plugins.xml
+++ b/log4j-docgen/src/test/resources/example-plugins.xml
@@ -15,7 +15,10 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<pluginSet xmlns="https://logging.apache.org/xml/ns/plugins"; version="0.1.0">
+<pluginSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+           xmlns="https://logging.apache.org/xml/ns";
+           xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd";
+           version="0.1.0">
     <groupId>org.apache.logging.log4j</groupId>
     <artifactId>log4j-core</artifactId>
     <version>2.22.0</version>
diff --git a/log4j-docgen/src/test/resources/generated-plugins.xml 
b/log4j-docgen/src/test/resources/generated-plugins.xml
index 0a37586..3e4002f 100644
--- a/log4j-docgen/src/test/resources/generated-plugins.xml
+++ b/log4j-docgen/src/test/resources/generated-plugins.xml
@@ -15,7 +15,10 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<pluginSet xmlns="https://logging.apache.org/xml/ns/plugins"; version="0.1.0">
+<pluginSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+           xmlns="https://logging.apache.org/xml/ns";
+           xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-plugins-0.1.0.xsd";
+           version="0.1.0">
     <groupId>com.example.groupId</groupId>
     <artifactId>example-artifactId</artifactId>
     <version>1.2.3</version>
diff --git a/log4j-docgen/src/test/resources/generated-plugins.xsd 
b/log4j-docgen/src/test/resources/generated-plugins.xsd
index a553813..609ee0b 100644
--- a/log4j-docgen/src/test/resources/generated-plugins.xsd
+++ b/log4j-docgen/src/test/resources/generated-plugins.xsd
@@ -19,7 +19,7 @@
   ~ This is a test schema used in `SchemaGeneratorTest`.
   ~ Unlike this file the `SchemaGenerator` strips whitespace.
   -->
-<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:log4j="http://logging.apache.org/xml/ns/config"; 
elementFormDefault="qualified" 
targetNamespace="http://logging.apache.org/xml/ns/config";>
+<schema xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:log4j="https://logging.apache.org/xml/ns"; elementFormDefault="qualified" 
targetNamespace="https://logging.apache.org/xml/ns"; version="0.1.0">
   <element type="log4j:org.apache.logging.log4j.core.config.Configuration" 
name="Configuration"/>
   <simpleType name="org.apache.logging.log4j.Level">
     <annotation>

Reply via email to