XSD: element with string content, one attribute, no children tags

raw

example.xml

1
<playlist-script create-link="yes">/path/to/script</playlist-script>
raw

example.xsd

1
2
3
4
5
6
7
8
9
10
11
12
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="playlist-script">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:string">
                    <xs:attribute name="create-link" type="boolean" default="yes"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
</xs:schema>
Christian Weiske Christian Weiske
owner

History