[oXygen-user] Validating a Maven pom.xml file in Oxygen?

DaMommio, Aaron D (Aaron) aarond at motive.com
Thu Dec 5 11:51:58 CST 2013

Thank you.
It seems I was unable to figure this out before because of 2 problems:
- Could not download the schema from apache (proxy? Not sure)
- When I got a local copy, I got the wrong thing initially (I'd made a local copy a couple months ago and it threw errors; today, when I got one from http://maven.apache.org/xsd/maven-4.0.0.xsd, it worked)
	... both of these together left me pretty confused, but your reply made me try the local copy again.

I created a simple framework that detected the type based on the namespace, and embedded it in my existing custom framework. So, now my users will be able to validate poms so long as they have 
<project xmlns="http://maven.apache.org/POM/4.0.0">
And have an updated copy of our custom framework.

Much obliged,

-----Original Message-----
From: oxygen-user-bounces at oxygenxml.com [mailto:oxygen-user-bounces at oxygenxml.com] On Behalf Of Oxygen XML Editor Support
Sent: Thursday, December 05, 2013 4:47 AM
To: oxygen-user at oxygenxml.com
Subject: Re: [oXygen-user] Validating a Maven pom.xml file in Oxygen?

Hi Aaron,

The Maven XML Schema has a target namespace so the reference to it from the XML document should be like:

> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/xsd/maven-4.0.0.xsd">

Basically the value of the "xsi:schemaLocation" attribute is usually list of (targetNamespace schemaLocation) pairs.

If you do not want to link directly to the schema from the XML you should consider downloading the schema to a local folder and creating a basic document type association in the Oxygen Preferences->"Document Type Association" page:



Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com

On 12/4/2013 9:02 PM, DaMommio, Aaron D (Aaron) wrote:
> I don't seem to be able to validate Maven pom files in Oxygen (v12.2 or v15) .
> <project xmlns="http://maven.apache.org/POM/4.0.0" >
> I did some web research, got some indications that I needed to add more attributes to my root element...
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/xsd/maven-4.0.0.xsd">
> But both of the above formulations generate 'no schema or DTD associated' errors.
> Any clues here?
> Thanks,
> Aaron DaMommio
> ===================
> T: (512) 531-2408
> M: (512) 762-4326
> aarond at motive.com
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
oXygen-user mailing list
oXygen-user at oxygenxml.com

More information about the oXygen-user mailing list