Change comment / test for clarification

This commit is contained in:
Molkobain
2021-07-28 15:59:43 +02:00
parent df473ae313
commit 431dc5532b
3 changed files with 8 additions and 5 deletions

View File

@@ -799,7 +799,8 @@ class iTopDesignFormat
$this->MoveNode($oNode, $oSemanticNode, "state_attribute");
}
// New values format contains code
// New field format, value contains code
// Note: In the XPath there is no filter on the xsi:type as this (XML) attribute is not present on fields overloads. The main drawback is that it will convert any custom AttributeXXX with the same syntax.
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field/values/value");
foreach ($oNodeList as $oNode) {
$sCode = $oNode->textContent;
@@ -888,7 +889,9 @@ class iTopDesignFormat
$sPath = "/itop_design//class/properties/fields_semantic";
$this->RemoveNodeFromXPath($sPath);
// New values format
// New field format
// Note: In the XPath there is no filter on the xsi:type as this (XML) attribute is not present on fields overloads. The main drawback is that it will convert any custom AttributeXXX with the same syntax.
// - Values
$oNodeList = $oXPath->query("/itop_design/classes//class/fields/field/values/value");
foreach ($oNodeList as $oNode) {
$oCodeNode = $oXPath->query('code', $oNode)->item(0);
@@ -902,7 +905,7 @@ class iTopDesignFormat
$oNode->textContent = $sCode;
}
}
// - Style
$sPath = "/itop_design/classes//class/fields/field/default_style";
$this->RemoveNodeFromXPath($sPath);

View File

@@ -17,7 +17,7 @@
</themes>
</branding>
<classes>
<class id="PhysicalDevice" _delta="must_exist">
<class id="ClassWithNewValueInFieldWhichHasNoXsiTypeDueToMustExistFlag" _delta="must_exist">
<fields>
<field id="status" _delta="must_exist">
<values>

View File

@@ -20,7 +20,7 @@
</themes>
</branding>
<classes>
<class id="PhysicalDevice" _delta="must_exist">
<class id="ClassWithNewValueInFieldWhichHasNoXsiTypeDueToMustExistFlag" _delta="must_exist">
<fields>
<field id="status" _delta="must_exist">
<values>