Commit 4c5dde83 authored by co887baqi's avatar co887baqi

Fix malformed structure tag in sample save

parent c25e65d2
......@@ -7,7 +7,7 @@ CHANCE_DERIVATE = 0.5
local BASE_OBJECT = [[<?xml version="1.0" encoding="UTF-8"?>
<mycoreobject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" ID="ULBeeHealth_anihealth_<&ID_OBJECT_PADDED&>" label="ULVetBee <&ID_OBJECT_PADDED&>" version="2019.06.4-SNAPSHOT" xsi:noNamespaceSchemaLocation="datamodel-anihealth.xsd">
<&STRUCTURE&>
<structure />
<metadata xml:lang="de">
<def.anihealth01 class="MCRMetaLangText" heritable="false" notinherit="true">
<anihealth01 form="plain" inherited="0" xml:lang="de">ULVetBee <&ID_OBJECT&></anihealth01>
......@@ -116,17 +116,6 @@ local BASE_DERIVATE = [[<?xml version="1.0" encoding="UTF-8"?>
</service>
</mycorederivate>]]
local STRUCTURE_EMPTY = [[<structure />]]
local STRUCTURE_DERIVATE = [[ <structure>
<derobjects class="MCRMetaEnrichedLinkID">
<derobject inherited="0" xlink:type="locator" xlink:title="data object from ULBeeHealth_anihealth_<&ID_OBJECT_PADDED&>" xlink:href="ULBeeHealth_derivate_<&ID_DERIVATE_PADDED&>">
<order>1</order>
<maindoc>example.png</maindoc>
</derobject>
</derobjects>
</structure>]]
-- hexdump of example.png
local EXAMPLE_PNG =
{ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52
......@@ -1424,12 +1413,6 @@ for i = 1, _G.COUNT do
ID_DERIVATE_PADDED = string.format ("%08i", id_derivate),
}
if (hasDerivate == false) then
vars.STRUCTURE = STRUCTURE_EMPTY
else
vars.STRUCTURE = replacePlaceholders (STRUCTURE_DERIVATE, vars)
end
local obj = io.open (string.format (
"ULBeeHealth_anihealth_Server/ULBeeHealth_anihealth_%s.xml", vars.ID_OBJECT_PADDED
), "w")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment