Closed jolcese closed 11 years ago
Hi Jose,
I'm assuming you are referring to the id of the data element - environment also has a non negative although optional id -, and what I see is type="xsd:nonNegativeInteger"
and use="required"
in line 132 of the schema. Can you please double check?
Thanks
That's right. It's the id of the Data element.
I used to use: pac.update([eeml.Data("Power", power, unit=eeml.Unit('Watt','derivedSI','W')), eeml.Data("PowerApparent", powerapparent, unit=eeml.Unit('VoltAmpere','derivedSI','VA')), eeml.Data("PowerAccumulated", poweracc, unit=eeml.Unit('WattHour','derivedSI','kWh')), eeml.Data("Current", current, unit=eeml.Unit('Ampere','basicSI','mA')), eeml.Data("Voltage", voltage, unit=eeml.Unit('Volt','derivedSI','V')), eeml.Data("PowerFactor", powerfactor)])
<eeml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.eeml.org/xsd/0.5.1"
xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1
http://www.eeml.org/xsd/0.5.1/0.5.1.xsd"
version="0.5.1">
But now I need to use: pac.update([eeml.Data(0, power, unit=eeml.Unit('Watt','derivedSI','W')), eeml.Data(1, powerapparent, unit=eeml.Unit('VoltAmpere','derivedSI','VA')), eeml.Data(2, poweracc, unit=eeml.Unit('WattHour','derivedSI','kWh')), eeml.Data(3, current, unit=eeml.Unit('Ampere','basicSI','mA')), eeml.Data(4, voltage, unit=eeml.Unit('Volt','derivedSI','V')), eeml.Data(5, powerfactor)])
<eeml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.eeml.org/xsd/0.5.1"
xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1
http://www.eeml.org/xsd/0.5.1/0.5.1.xsd"
version="0.5.1">
J+
On Thu, Jan 31, 2013 at 12:06 PM, Peter Vizi notifications@github.comwrote:
Hi Jose,
I'm assuming you are referring to the id of the data element - environment also has a non negative although optional id -, and what I see is type="xsd:nonNegativeInteger" and use="required" in line 132 of the schema. Can you please double check?
Thanks
— Reply to this email directly or view it on GitHubhttps://github.com/petervizi/python-eeml/issues/24#issuecomment-12946423.
So do we agree that prior to version 4.0.0 the generated xml wasn't valid eeml? If so I'll close this ticket.
Yes, I agree that it wasn't a valid eeml. However I suggest to add some mechanism to allow these non-valid eeml in order to be able to still communicate with Cosm :)
J+
On Thu, Jan 31, 2013 at 1:49 PM, Peter Vizi notifications@github.comwrote:
So do we agree that prior to version 4.0.0 the generated xml wasn't valid eeml? If so I'll close this ticket.
— Reply to this email directly or view it on GitHubhttps://github.com/petervizi/python-eeml/issues/24#issuecomment-12952026.
Sorry for the slow turnaround. Can you give the Invalidator a try to see if it fits your use case?
Cosm currently does not enforce "id" to be nonNegativeInteger (per EEML 0.5.1) so commit c75e280bdcc2e8e171dbae527cf18e4bff5d03ce breaks previous Datastreams with String identifiers. Those can't be updated any longer.