[
https://issues.apache.org/jira/browse/FELIX-2357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871771#action_12871771
]
Łukasz Dywicki commented on FELIX-2357:
---------------------------------------
{code}<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xs:schema elementFormDefault='qualified'
targetNamespace='http://felix.apache.org/karaf/xmlns/features/v1.0.0'
xmlns:xs='http://www.w3.org/2001/XMLSchema'
xmlns:tns='http://felix.apache.org/karaf/xmlns/features/v1.0.0'>
<xs:complexType name="featuresRoot">
<xs:sequence>
<xs:element name="repository" type="xs:string" minOccurs="0"
maxOccurs="0" />
<xs:element name="feature" type="tns:feature" maxOccurs="unbounded"
/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="feature">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="feature" type="tns:dependency" />
<xs:element name="bundle" type="xs:anyURI" />
<xs:element name="config" type="tns:config" />
</xs:choice>
<xs:attribute name="name" type="tns:featureName" use="required" />
<xs:attribute name="version" type="xs:string" default="0.0.0" />
</xs:complexType>
<xs:complexType name="dependency">
<xs:simpleContent>
<xs:extension base="tns:featureName">
<xs:attribute name="version" type="xs:string" default="0.0.0" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="config">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="featureName">
<xs:restriction base="xs:string">
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<xs:element name="features" type="tns:featuresRoot" />
</xs:schema>{code}
Schema proposal.
> Provide XML Schema for feature descriptors and support it's validation
> ----------------------------------------------------------------------
>
> Key: FELIX-2357
> URL: https://issues.apache.org/jira/browse/FELIX-2357
> Project: Felix
> Issue Type: Improvement
> Components: Karaf
> Affects Versions: karaf-1.0.0, karaf-1.2.0, karaf-1.4.0
> Reporter: Łukasz Dywicki
>
> Current version of feature service does not validate structure of document.
> It would be nice to add XML Schema from next reasons:
> - better tooling in IDEs
> - less mistakes
> - semantic correctness
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.