[ https://issues.apache.org/jira/browse/IVY-1029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671056#action_12671056 ]
Benjamin Francisoud commented on IVY-1029:
------------------------------------------
Thanks Maarten for your quick answer, unfortunalty if I use your declaration, I don't think any xsd validation is apply to the xml...
In eclipse I get the following warning message:
"No grammar constraints (DTD or XML schema) detected for the document."
In the xsd w3c standard, you can declare an external location for the xsd file that will override the default one describe at the beginning of your xml file.
http://www.w3.org/TR/xmlschema-1/#schema-loc
In eclipse this is achieve by using the Preferences > XML > XML Catalogs menu.
I'll add screen captures of my eclipse configuration to this jira.
But you need to provide a "key" (aka target namespace) for eclipse to know where to apply the xsd that's why, in my opinion, the xsd is not apply if you remove the "xmlns" attribute.
I will try the trunk version of the xsd.
> Unable to specify xsi:schemaLocation or xsi:noSchemaLocation with ivy.xsd
> -------------------------------------------------------------------------
>
> Key: IVY-1029
> URL: https://issues.apache.org/jira/browse/IVY-1029
> Project: Ivy
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Benjamin Francisoud
>
> I'm trying to get auto-completion of ivy.xml in eclipse but I just can make it work :(
> h2. ivy.xml with defaultNamespace
> {code:xml}
>
> xmlns="http://ant.apache.org/ivy"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:noSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> {code}
> * Error message
> {noformat}
> [ivy:retrieve] :: Ivy 2.0.0 - 20090108225011 :: http://ant.apache.org/ivy/ ::
> :: loading settings :: file = E:\development\eclipse\workspaces\spot\Ivy-Xsd\ivy\ivysettings.xml
> [ivy:retrieve] [xml parsing: ivy.xml:5:67: cvc-elt.1: Cannot find the declaration of element 'ivy-module'. in file:/E:/development/eclipse/workspaces/
> spot/Ivy-Xsd/ivy.xml
> [ivy:retrieve] ]
> {noformat}
> h2. ivy.xml with targetNamespace
> {code:xml}
>
> xmlns:ivy="http://ant.apache.org/ivy"
> xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://ant.apache.org/ivy http://ant.apache.org/ivy/schemas/ivy.xsd">
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> {code}
> * Error message:
> {noformat}
> [ivy:retrieve] [xml parsing: ivy.xml:5:92: cvc-elt.1: Cannot find the declaration of element 'ivy:ivy-module'. in file:/E:/development/eclipse/workspa
> ces/spot/Ivy-Xsd/ivy.xml
> [ivy:retrieve] , unknown tag ivy:ivy-module in file:/E:/development/eclipse/workspaces/spot/Ivy-Xsd/ivy.xml
> [ivy:retrieve] ]
> {noformat}
> Same error message in eclipse, what am I missing ?
> Fix? Just add {noformat}targetNamespace="http://ant.apache.org/ivy"{noformat} attribute on root node in ivy.xsd ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.