dadon-david commented on pull request #200:
URL: https://github.com/apache/maven-site/pull/200#issuecomment-695781151


   Hi @michael-o :)
   
   Thank you for your rapid response,
   
   Maybe I didn't explained my PR enough, sorry if this is the case.
   
   On the existing `maven-archetype-quickstart` the `targetNamespace` on the 
XSD match the `xmlns` on the XML . So I thought it would solve my problem. 
[Source code 
here](https://github.com/apache/maven-archetypes/blob/maven-archetype-bundles-1.4/maven-archetype-quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml)
   
   ```
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0";
 elementFormDefault="qualified" 
targetNamespace="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0";>
   ```
   
   ```
   <archetype-descriptor 
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
     
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd";
     name="quickstart" partial="false">
   ```
   
   The reason why I am opening this PR is because, without having 
`targetNamespace` and `xmlns` that match my IDE (IDEA 2020.2) can't find the 
associated schema and is in error (See the image below)
   
   I tried to fix this, to register it and to change many settings on the IDE 
side without success.
   
   And simply changing the namespace solved my issue.
   
   Maybe I miss something obvious or maybe it's a bug on IDEA.
   
   I've read a bit about XML and Namespace before opening this PR, maybe 
misunderstood something.
   
   In any case I would love to have a small explanation from you,
   
   With `targetNamespace` != `xmlns`
   
![image](https://user-images.githubusercontent.com/8955104/93710540-fb902880-fb47-11ea-9503-d2cbf49217e8.png)
   
   
   With `targetNamespace` == `xmlns`
   
![image](https://user-images.githubusercontent.com/8955104/93711197-9c80e280-fb4c-11ea-8336-4b40f3377288.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to