Did you try
<?xml version='1.0' encoding='UTF-8'?>
<repo:repository xmlns:repo="http://www.osgi.org/xmlns/repository/v1.0.0"
name="example">
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity"
value="org.apache.felix.framework"/>
<attribute name="type"
value="osgi.bundle"/>
<attribute name="version"
value="6.0.1"
type="Version"/>
</capability>
</resource>
</repo:repository>
<repo:repository xmlns:repo="http://www.osgi.org/xmlns/repository/v1.0.0"
name="example">
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity"
value="org.apache.felix.framework"/>
<attribute name="type"
value="osgi.bundle"/>
<attribute name="version"
value="6.0.1"
type="Version"/>
</capability>
</resource>
</repo:repository>
Note the use of the local name on the main repository element (I picked "repo" for my example).
--
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
----- Original message -----
From: Mark Raynsford via osgi-dev <osgi-dev@mail.osgi.org>
Sent by: osgi-dev-boun...@mail.osgi.org
To: osgi-dev@mail.osgi.org
Cc:
Subject: [osgi-dev] Validating repository XML?
Date: Mon, Oct 8, 2018 7:11 AM
Hello.
It seems as though it's not possible to validate XML repository files
against the published schema. I'm using the XSD from:
https://osgi.org/xmlns/repository/v1.0.0/repository.xsd
I've tried to validate numerous repository files produced by BND with
no luck. Even the following minimal example fails:
<?xml version='1.0' encoding='UTF-8'?>
<repository xmlns="http://www.osgi.org/xmlns/repository/v1.0.0"
name="example">
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity"
value="org.apache.felix.framework"/>
<attribute name="type"
value="osgi.bundle"/>
<attribute name="version"
value="6.0.1"
type="Version"/>
</capability>
</resource>
</repository>
The error is:
cvc-complex-type.2.4.a: Invalid content was found starting with element '{"http://www.osgi.org/xmlns/repository/v1.0.0":resource}'. One of '{resource, referral, WC[##other:"http://www.osgi.org/xmlns/repository/v1.0.0"]}' is expected.
At: 3:13
I'm using a validator that supports XML Schema 1.1 (I understand that
this is required due the published schema being non-deterministic).
What's wrong here?
--
Mark Raynsford | http://www.io7m.com
att3jm7a.dat Type: application/pgp-signature
Name: att3jm7a.dat_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
att4dz0l.dat
Description: Binary data
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev