I am actually moving a custom dataflow extension from Magento 1 to Magento 2.
In M1 we can add custom configuration / mapping for each flow using XML. The XML structure is free and thought by the developer that he use with
getNode() function in his code.
In M2 I would like to do the same thing. Have a file
flow.xml where the developer put his flow mapping and configuration.
I create the correct Reader from this post https://magento.stackexchange.com/a/82049/33619 which is working fine.
Now my issue is with XSD for my
flow.xml file to tell that node
<options></options> can contain whatever developer wants.
Here are my actual files :
# File flow.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Dnd_Flow:etc/flow.xsd"> <mapping> // Here can be string or other nodes on X levels </mapping> <options> // Here can be string or other nodes on X levels </options> </config>
My XSD file looks like this :
# File flow.xsd <?xml version="1.0" encoding="UTF-8"?> <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="config" type="configType" /> <xs:complexType name="configType"> <xs:sequence> <xs:element type="xs:????" name="mapping" minOccurs="0" /> <xs:element type="xs:????" name="options" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:schema>
mixed values, differents element types but no result.
I am new to XSD so I would like to know what is the solution to tell that there can be everything in my nodes ?