XML and JSON schema conflict and wrong values

69 views
Skip to first unread message

Roger Ineichen

unread,
Dec 24, 2014, 11:10:47 PM12/24/14
to europass...@googlegroups.com

There are some issues with differences in the json and xml schema.

Is this the right place to report such issues?

 

issue 1

-------

 

There is a difference in the json and xml schema. The XML schema restricts

the Use/Code value to business for the Website in Education and Organisation ContactInformation. The json schema allows to use all possible values.

(and this values are not in sync with the xml schema, see below)

 

issue 2

-------

 

The XML schema doesn't allow to use the Website/Use/Label for Education and

Organisation and the json schema allows to use them

 

issue 3

-------

 

There is a difference in the allowed values for the website types in the xml and json schema V3.2.0.

 

The value "work" is not valid since the XML schema defines blog since schema 3.0.

 

ContactInformation.xsd

 

    <xsd:simpleType name="WebsiteUsesEnumeration">

        <xsd:restriction base="xsd:string">

            <xsd:enumeration value="personal"/>

            <xsd:enumeration value="business"/>

            <xsd:enumeration value="blog"/>

            <xsd:enumeration value="portfolio"/>

        </xsd:restriction>

    </xsd:simpleType>

 

europass-json-schema-v3.2.0.json

 

    "websiteType":{

        "type" : "object",

        "properties": {

            "Contact": { "type": "string"},

            "Use": {

                "type": "object",

                "properties":{

                    "Code": {

                        "type": "string",

                        "enum":[

                            "personal",

                            "business",

                            "work",

                            "portfolio"

                        ]

                    },

                    "Label": {

                        "type": "string"

                    }

                },

                "additionalProperties": false

            }

        },

        "additionalProperties": false

    },

 

Europass Interoperability

unread,
Jan 9, 2015, 5:32:56 AM1/9/15
to europass...@googlegroups.com
Dear Roger,

Many thanks for your message and apologies for the late reply, just got back from the Christmas break.

Yes, this is the right place to interact with the Europass Interoperability team. In general, we favour the mailing list over e.g. emails since the information here is publicly available and as such might benefit other users as well.

Now about your points, you're absolutely correct in all three of them. 

Concerning the first two (discrepancies in what's allowed and what's not allowed between the XML and JSON Schema) they ended up this way simply because the JSON Schema is not yet as flexible as the XML Schema when it comes to inheritance models. The Europass XSD uses inheritance liberally in many different places and in some cases we couldn't find a straightforward way to apply the exact same semantics and restrictions in the JSON Schema too. Two of these cases have to do with the website type that you describe in your message, there might be others as well. In general I would say that the Europass JSON Schema is not yet as elaborate as the XML one, but we're working on it. Please do let us know if you have any specific solutions to propose for these particular problems that you faced.

As for your third point (different enum values between XML and JSON Schema), this is a bug in the JSON Schema and it will be corrected in the next release (no estimated time yet).

Thanks again for taking the time to bring these issues to our attention. Please do not hesitate to contact us for any other queries that you may have.

Best regards,

Dimitris Zavaliadis
Team Europass
Reply all
Reply to author
Forward
0 new messages