[
https://issues.apache.org/jira/browse/MNGSITE-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17429935#comment-17429935
]
Michael Osipov commented on MNGSITE-468:
----------------------------------------
This is wrong:
{{targetNamespace="https://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"}}.
> Namespace URI mismatch between documentation example and XSD
> ------------------------------------------------------------
>
> Key: MNGSITE-468
> URL: https://issues.apache.org/jira/browse/MNGSITE-468
> Project: Maven Project Web Site
> Issue Type: Bug
> Environment: N/A
> Reporter: Andreas Mixich
> Priority: Major
> Labels: Documentation, XSD, namespace
>
> The documentation example for the {{archetype-metadata.xml}} file uses a
> namespace name, whose URI has the {{http}} protocol defined while the
> "real-life" XML Schema for {{archetype-metadata.xml}} uses the {{https}}
> protocol.
> This issue appears at
> [http://maven.apache.org/guides/mini/guide-creating-archetypes.html#2-create-the-archetype-descriptor]
> in the archetype descriptor example's namespace on lines 2 and 3:
>
> {code:java}
> 1. <archetype-descriptor
> 2.
> xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 3.
> xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.1.0
> https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd"
> name="quickstart">
> {code}
>
> The XSD can be found at
> [https://maven.apache.org/xsd/archetype-descriptor-1.1.0.xsd]
> This breaks validation, as soon as a user copies and pastes the example as a
> starting point for their own Archetype Descriptor.
> Remark:
> XML namespace URIs are not meant to be dereferenced to an actual document.
> They are just a convention to produce a unique ID, which is easier for a
> human to remember, than, let's say a UUID. However, once set, they can not be
> legally changed without producing a completely new namespace! So
> [{\{http://example.org/}}|file://%7B%7Bhttp://example.org/%7D%7D] and
> {{[http://example.org|http://example.org/]}} are two distinct namespaces
> (note the trailing slash). Same stands for
> {{[https://example.org|https://example.org/]}} and
> [{{http://example.org}}.|http://example.org./] When hashed, both strings
> would lead to different results, of course.
> I don't know the history of this schema file, but in case, the namespace URI
> had once been using {{http}} instead of {{https}}, then this would render the
> current XSD incompatible with any previous versions.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)