0

私は実際に、彼の構成ファイルに XSD スキーマを実装する Magento 2 フレームワークを使用しています。開発者が XML マッピングといくつかの構成を記述し
たファイルがあります。 私の目標は、2 つのノードを必須にし、開発者が任意の XML 構造を記述できるようにすることです。 flow.xml
mappingoptions

これが私の実際のファイルです:

# 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 other nodes on X levels (or simply string = bonus) 
    </mapping>
    <options>
        // Here can be other nodes on X levels (or simply string = bonus) 
    </options>
</config>

私のXSDファイルは次のようになります:

# 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値、、xs:allさまざまな要素の種類 を試しましたが、結果はありませんでした。

これは簡単なことかもしれませんが、私は XSD スキーマが初めてで、2 つのノードにすべてが存在する可能性があるソリューションを見つけるのに苦労しています。

ありがとう、
マテオ。

4

1 に答える 1