diff --git a/setup/itopdesignformat.class.inc.php b/setup/itopdesignformat.class.inc.php index 846ab27cd..a7e49fe29 100644 --- a/setup/itopdesignformat.class.inc.php +++ b/setup/itopdesignformat.class.inc.php @@ -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); diff --git a/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.expected.xml b/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.expected.xml index 50272614e..f3ddfdd1b 100644 --- a/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.expected.xml +++ b/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.expected.xml @@ -17,7 +17,7 @@ - + diff --git a/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.input.xml b/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.input.xml index 8f4864afe..467e02660 100644 --- a/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.input.xml +++ b/test/setup/iTopDesignFormat/Convert-samples/1.7_to_3.0.input.xml @@ -20,7 +20,7 @@ - +