Testharness report for XML.
This is the unit test report for XML, which produces integrity checks and output for debugging XML.
| Test suite status | |
|---|---|
| Scribunto test cases | |
| Code coverage |
Unit test report for XML.
- Test members missing: none
- Test cases failing: none
- Execution time: 28.7ms
Scribunto test cases
| ||
|---|---|---|
| Status | Code | Differs at |
p.serialise("XML Decl : xml
+ version="1.0"
+ encoding="UTF-8"
+ standalone="no"
Comment : XML schema for Wikia's propietary XML syntax.
Comment : For simplicity, this file does not include MediaWiki and HTML tags.
Start : xs:schema
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
Comment : # Validator restrictions used in infobox attributes. #
Comment : ## Infobox title color validation. ##
Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]]
Start : xs:simpleType
+ name="piColor"
Start : xs:restriction
+ base="xs:string"
Start : xs:pattern
+ value="[a-f0-9]{3}([a-f0-9]{3})?)"
End : xs:pattern
End : xs:restriction
End : xs:simpleType
Comment : ## Infobox layout attribute validation. ##
Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]]
Start : xs:simpleType
+ name="piInfoboxLayout"
Start : xs:restriction
+ base="xs:string"
Start : xs:enumeration
+ value="default"
End : xs:enumeration
Start : xs:enumeration
+ value="stacked"
End : xs:enumeration
End : xs:restriction
End : xs:simpleType
Comment : ## Group layout attribute validation. ##
Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]]
Start : xs:simpleType
+ name="piGroupLayout"
Start : xs:restriction
+ base="xs:string"
Start : xs:enumeration
+ value="default"
End : xs:enumeration
Start : xs:enumeration
+ value="horizontal"
End : xs:enumeration
End : xs:restriction
End : xs:simpleType
Comment : ## Group show attribute validation. ##
Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]]
Start : xs:simpleType
+ name="pigroupShow"
Start : xs:restriction
+ base="xs:string"
Start : xs:enumeration
+ value="default"
End : xs:enumeration
Start : xs:enumeration
+ value="incomplete"
End : xs:enumeration
End : xs:restriction
End : xs:simpleType
Comment : ## Group collapse attribute validation. ##
Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]]
Start : xs:simpleType
+ name="piGroupCollapse"
Start : xs:restriction
+ base="xs:string"
Start : xs:enumeration
+ value="open"
End : xs:enumeration
Start : xs:enumeration
+ value="closed"
End : xs:enumeration
End : xs:restriction
End : xs:simpleType
Comment : # Group element definition. #
Start : xs:element
+ name="group"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="panel"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="header"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="title"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="image"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="navigation"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="data"
+ maxOccurs="unbounded"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="piGroupLayout"
+ name="layout"
End : xs:attribute
Start : xs:attribute
+ type="pigroupShow"
+ name="show"
End : xs:attribute
Start : xs:attribute
+ type="piGroupCollapse"
+ name="collapse"
End : xs:attribute
Start : xs:attribute
+ type="xs:int"
+ name="row-items"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:complexType
End : xs:element
Comment : # Panel element definition. #
Start : xs:element
+ name="panel"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="section"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="header"
+ maxOccurs="unbounded"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:complexType
End : xs:element
Comment : # Section element definition. #
Comment : Serves as tabbed group in panel container
Start : xs:element
+ name="section"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="label"
+ maxOccurs="1"
End : xs:element
Start : xs:element
+ ref="group"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="header"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="title"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="image"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="navigation"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="data"
+ maxOccurs="unbounded"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:complexType
End : xs:element
Comment : # Header element definition. #
Start : xs:element
+ name="header"
Start : xs:complexType
Start : xs:simpleContent
Start : xs:extension
+ base="xs:string"
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:extension
End : xs:simpleContent
End : xs:complexType
End : xs:element
Comment : # Navigation element definition. #
Start : xs:element
+ name="navigation"
Start : xs:complexType
Start : xs:simpleContent
Start : xs:extension
+ base="xs:string"
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:extension
End : xs:simpleContent
End : xs:complexType
End : xs:element
Comment : # Title element definition. #
Start : xs:element
+ name="title"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="format"
End : xs:element
Start : xs:element
+ ref="default"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="source"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:complexType
End : xs:element
Comment : # Data element definitions. #
Start : xs:element
+ name="data"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="label"
End : xs:element
Start : xs:element
+ ref="format"
End : xs:element
Start : xs:element
+ ref="default"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="source"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="span"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="layout"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
End : xs:complexType
End : xs:element
Start : xs:element
+ type="xs:string"
+ name="label"
End : xs:element
Start : xs:element
+ type="xs:string"
+ name="format"
End : xs:element
Start : xs:element
+ type="xs:string"
+ name="default"
End : xs:element
Comment : # Image element definitions. #
Start : xs:element
+ name="image"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="alt"
+ maxOccurs="1"
End : xs:element
Start : xs:element
+ ref="caption"
+ maxOccurs="1"
End : xs:element
Start : xs:element
+ ref="default"
+ maxOccurs="1"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="source"
End : xs:attribute
End : xs:complexType
End : xs:element
Start : xs:element
+ name="alt"
Start : xs:complexType
Start : xs:choice
Start : xs:element
+ ref="default"
+ minOccurs="0"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="source"
End : xs:attribute
End : xs:complexType
End : xs:element
Start : xs:element
+ name="caption"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="format"
+ maxOccurs="1"
End : xs:element
Start : xs:element
+ ref="default"
+ maxOccurs="1"
End : xs:element
End : xs:choice
Start : xs:attribute
+ type="xs:string"
+ name="source"
End : xs:attribute
End : xs:complexType
End : xs:element
Comment : # Infobox element definition. #
Comment : Serves as infobox container & delimiter.
Start : xs:element
+ name="infobox"
Start : xs:complexType
Start : xs:choice
+ maxOccurs="unbounded"
Start : xs:element
+ ref="group"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="panel"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="title"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="image"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="navigation"
+ maxOccurs="unbounded"
End : xs:element
Start : xs:element
+ ref="data"
+ maxOccurs="unbounded"
End : xs:element
End : xs:choice
Start : xs:attribute
+ name="layout"
Start : xs:simpleType
Start : xs:restriction
+ base="piInfoboxLayout"
End : xs:restriction
End : xs:simpleType
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="name"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="theme"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="theme-source"
End : xs:attribute
Start : xs:attribute
+ type="xs:string"
+ name="type"
End : xs:attribute
Start : xs:attribute
+ name="accent-color-source"
Start : xs:simpleType
Start : xs:restriction
+ base="piColor"
End : xs:restriction
End : xs:simpleType
End : xs:attribute
Start : xs:attribute
+ name="accent-color-default"
Start : xs:simpleType
Start : xs:restriction
+ base="piColor"
End : xs:restriction
End : xs:simpleType
End : xs:attribute
Start : xs:attribute
+ name="accent-color-text-source"
Start : xs:simpleType
Start : xs:restriction
+ base="piColor"
End : xs:restriction
End : xs:simpleType
End : xs:attribute
Start : xs:attribute
+ name="accent-color-text-default"
Start : xs:simpleType
Start : xs:restriction
+ base="piColor"
End : xs:restriction
End : xs:simpleType
End : xs:attribute
End : xs:complexType
End : xs:element
End : xs:schema
") | ||
| Expected | ||
|
cannot serialise this value. Are you using a handler other than "xml.handlers.DOM" and "xml.handlers.Tree"? | ||
| Actual | ||
|
cannot serialise this value. Are you using a handler other than "xml.handlers.DOM" and "xml.handlers.Tree"? | ||
p.serialise({ _attr = { ["xmlns:xs"] = "http://www.w3.org/2001/XMLSchema" }, _children = { { _text = "# Validator restrictions used in infobox attributes. #", _type = "COMMENT" }, { _text = "## Infobox title color validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]]", _type = "COMMENT" }, { _attr = { name = "piColor" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "[a-f0-9]{3}([a-f0-9]{3})?)" }, _children = { n = 0 }, _name = "xs:pattern", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Infobox layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]]", _type = "COMMENT" }, { _attr = { name = "piInfoboxLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "stacked" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]]", _type = "COMMENT" }, { _attr = { name = "piGroupLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "horizontal" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group show attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]]", _type = "COMMENT" }, { _attr = { name = "pigroupShow" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "incomplete" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group collapse attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]]", _type = "COMMENT" }, { _attr = { name = "piGroupCollapse" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "open" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "closed" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "# Group element definition. #", _type = "COMMENT" }, { _attr = { name = "group" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout", type = "piGroupLayout" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "show", type = "pigroupShow" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "collapse", type = "piGroupCollapse" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "row-items", type = "xs:int" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Panel element definition. #", _type = "COMMENT" }, { _attr = { name = "panel" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "section" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Section element definition. #", _type = "COMMENT" }, { _text = "Serves as tabbed group in panel container", _type = "COMMENT" }, { _attr = { name = "section" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Header element definition. #", _type = "COMMENT" }, { _attr = { name = "header" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Navigation element definition. #", _type = "COMMENT" }, { _attr = { name = "navigation" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Title element definition. #", _type = "COMMENT" }, { _attr = { name = "title" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Data element definitions. #", _type = "COMMENT" }, { _attr = { name = "data" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "span", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "layout", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "label", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "format", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "default", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Image element definitions. #", _type = "COMMENT" }, { _attr = { name = "image" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "alt" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "caption" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "alt" }, _children = { { _children = { { _children = { { _attr = { minOccurs = "0", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "caption" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Infobox element definition. #", _type = "COMMENT" }, { _text = "Serves as infobox container & delimiter.", _type = "COMMENT" }, { _attr = { name = "infobox" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout" }, _children = { { _children = { { _attr = { base = "piInfoboxLayout" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme-source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "type", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:schema", _type = "ELEMENT"}) | ||
| Expected | ||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- # Validator restrictions used in infobox attributes. # --> <!-- ## Infobox title color validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] --> <xs:simpleType name="piColor"> <xs:restriction base="xs:string"> <xs:pattern value="[a-f0-9]{3}([a-f0-9]{3})?)" /> </xs:restriction> </xs:simpleType> <!-- ## Infobox layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] --> <xs:simpleType name="piInfoboxLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="stacked" /> </xs:restriction> </xs:simpleType> <!-- ## Group layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] --> <xs:simpleType name="piGroupLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="horizontal" /> </xs:restriction> </xs:simpleType> <!-- ## Group show attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] --> <xs:simpleType name="pigroupShow"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="incomplete" /> </xs:restriction> </xs:simpleType> <!-- ## Group collapse attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] --> <xs:simpleType name="piGroupCollapse"> <xs:restriction base="xs:string"> <xs:enumeration value="open" /> <xs:enumeration value="closed" /> </xs:restriction> </xs:simpleType> <!-- # Group element definition. # --> <xs:element name="group"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout" type="piGroupLayout" /> <xs:attribute name="show" type="pigroupShow" /> <xs:attribute name="collapse" type="piGroupCollapse" /> <xs:attribute name="row-items" type="xs:int" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Panel element definition. # --> <xs:element name="panel"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="section" /> <xs:element maxOccurs="unbounded" ref="header" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Section element definition. # --> <!-- Serves as tabbed group in panel container --> <xs:element name="section"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="label" /> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Header element definition. # --> <xs:element name="header"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Navigation element definition. # --> <xs:element name="navigation"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Title element definition. # --> <xs:element name="title"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Data element definitions. # --> <xs:element name="data"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="label" /> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="span" type="xs:string" /> <xs:attribute name="layout" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="label" type="xs:string" /> <xs:element name="format" type="xs:string" /> <xs:element name="default" type="xs:string" /> <!-- # Image element definitions. # --> <xs:element name="image"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="alt" /> <xs:element maxOccurs="1" ref="caption" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="alt"> <xs:complexType> <xs:choice> <xs:element ref="default" minOccurs="0" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="caption"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="format" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Infobox element definition. # --> <!-- Serves as infobox container & delimiter. --> <xs:element name="infobox"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout"> <xs:simpleType> <xs:restriction base="piInfoboxLayout" /> </xs:simpleType> </xs:attribute> <xs:attribute name="name" type="xs:string" /> <xs:attribute name="theme" type="xs:string" /> <xs:attribute name="theme-source" type="xs:string" /> <xs:attribute name="type" type="xs:string" /> <xs:attribute name="accent-color-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> | ||
| Actual | ||
|
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- # Validator restrictions used in infobox attributes. # --> <!-- ## Infobox title color validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] --> <xs:simpleType name="piColor"> <xs:restriction base="xs:string"> <xs:pattern value="[a-f0-9]{3}([a-f0-9]{3})?)" /> </xs:restriction> </xs:simpleType> <!-- ## Infobox layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] --> <xs:simpleType name="piInfoboxLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="stacked" /> </xs:restriction> </xs:simpleType> <!-- ## Group layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] --> <xs:simpleType name="piGroupLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="horizontal" /> </xs:restriction> </xs:simpleType> <!-- ## Group show attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] --> <xs:simpleType name="pigroupShow"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="incomplete" /> </xs:restriction> </xs:simpleType> <!-- ## Group collapse attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] --> <xs:simpleType name="piGroupCollapse"> <xs:restriction base="xs:string"> <xs:enumeration value="open" /> <xs:enumeration value="closed" /> </xs:restriction> </xs:simpleType> <!-- # Group element definition. # --> <xs:element name="group"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout" type="piGroupLayout" /> <xs:attribute name="show" type="pigroupShow" /> <xs:attribute name="collapse" type="piGroupCollapse" /> <xs:attribute name="row-items" type="xs:int" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Panel element definition. # --> <xs:element name="panel"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="section" /> <xs:element maxOccurs="unbounded" ref="header" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Section element definition. # --> <!-- Serves as tabbed group in panel container --> <xs:element name="section"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="label" /> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Header element definition. # --> <xs:element name="header"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Navigation element definition. # --> <xs:element name="navigation"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Title element definition. # --> <xs:element name="title"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Data element definitions. # --> <xs:element name="data"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="label" /> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="span" type="xs:string" /> <xs:attribute name="layout" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="label" type="xs:string" /> <xs:element name="format" type="xs:string" /> <xs:element name="default" type="xs:string" /> <!-- # Image element definitions. # --> <xs:element name="image"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="alt" /> <xs:element maxOccurs="1" ref="caption" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="alt"> <xs:complexType> <xs:choice> <xs:element ref="default" minOccurs="0" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="caption"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="format" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Infobox element definition. # --> <!-- Serves as infobox container & delimiter. --> <xs:element name="infobox"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout"> <xs:simpleType> <xs:restriction base="piInfoboxLayout" /> </xs:simpleType> </xs:attribute> <xs:attribute name="name" type="xs:string" /> <xs:attribute name="theme" type="xs:string" /> <xs:attribute name="theme-source" type="xs:string" /> <xs:attribute name="type" type="xs:string" /> <xs:attribute name="accent-color-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> | ||
p.serialise({ _children = { { _children = { { _children = { { _text = "Gambardella, Matthew", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "XML Developer's Guide", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Computer", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "44.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-10-01", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "An in-depth look at creating applications \n with XML.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Ralls, Kim", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Midnight Rain", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-12-16", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Corets, Eva", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Maeve Ascendant", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-11-17", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, n = 0 }, _name = "catalog", _type = "ELEMENT"}) | ||
| Expected | ||
|
<catalog> <book> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> </catalog> | ||
| Actual | ||
|
<catalog> <book> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> </catalog> | ||
p.serialise({ _children = { { _attr = { type = "natural" }, _children = { { _text = "<![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]>", _type = "TEXT" }, { _text = "Just an example comment that will be ignored by the tree handler and processed by the other ones.", _type = "COMMENT" }, { _children = { { _text = "Manoel", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "natural" }, _children = { { _children = { { _text = "Breno", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "legal" }, _children = { { _children = { { _text = "University of Brasília", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Brasília-DF", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, n = 0 }, _name = "people", _type = "ELEMENT"}) | ||
| Expected | ||
|
<people> <person type="natural"> <![CDATA[ Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. ]]> <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. --> <name>Manoel</name> <city>Palmas-TO</city> </person> <person type="natural"> <name>Breno</name> <city>Palmas-TO</city> </person> <person type="legal"> <name>University of Brasília</name> <city>Brasília-DF</city> </person> </people> | ||
| Actual | ||
|
<people> <person type="natural"> <![CDATA[ Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. ]]> <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. --> <name>Manoel</name> <city>Palmas-TO</city> </person> <person type="natural"> <name>Breno</name> <city>Palmas-TO</city> </person> <person type="legal"> <name>University of Brasília</name> <city>Brasília-DF</city> </person> </people> | ||
| ||
|---|---|---|
| Status | Code | Differs at |
p.load("Module:DEV/NULL") | ||
| Expected | ||
|
file "Module:DEV/NULL" does not contain XML | ||
| Actual | ||
|
file "Module:DEV/NULL" does not contain XML | ||
p.load("Dev:DEV/NULL") | ||
| Expected | ||
|
file "Dev:DEV/NULL" does not contain XML | ||
| Actual | ||
|
file "Dev:DEV/NULL" does not contain XML | ||
p.load("Module:XML") | ||
| Expected | ||
|
file "Module:XML" does not contain XML | ||
| Actual | ||
|
file "Module:XML" does not contain XML | ||
p.load("Module:XML/testcases/books") | ||
| Expected | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx --> <catalog> <book> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> </catalog> | ||
| Actual | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx --> <catalog> <book> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> </book> <book> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> </book> <book> <author>Corets, Eva</author> <title>Maeve Ascendant</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-11-17</publish_date> <description>After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.</description> </book> </catalog> | ||
p.load("Module:XML/testcases/people") | ||
| Expected | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml --> <people> <person type="natural"> <![CDATA[ Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. ]]> <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. --> <name>Manoel</name> <city>Palmas-TO</city> </person> <person type="natural"> <name>Breno</name> <city>Palmas-TO</city> </person> <person type="legal"> <name>University of Brasília</name> <city>Brasília-DF</city> </person> </people> | ||
| Actual | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml --> <people> <person type="natural"> <![CDATA[ Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. ]]> <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. --> <name>Manoel</name> <city>Palmas-TO</city> </person> <person type="natural"> <name>Breno</name> <city>Palmas-TO</city> </person> <person type="legal"> <name>University of Brasília</name> <city>Brasília-DF</city> </person> </people> | ||
p.load("Module:XML/testcases/infobox") | ||
| Expected | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- XML schema for Wikia's propietary XML syntax. --> <!-- For simplicity, this file does not include MediaWiki and HTML tags. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- # Validator restrictions used in infobox attributes. # --> <!-- ## Infobox title color validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] --> <xs:simpleType name="piColor"> <xs:restriction base="xs:string"> <xs:pattern value="[a-f0-9]{3}([a-f0-9]{3})?)" /> </xs:restriction> </xs:simpleType> <!-- ## Infobox layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] --> <xs:simpleType name="piInfoboxLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="stacked" /> </xs:restriction> </xs:simpleType> <!-- ## Group layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] --> <xs:simpleType name="piGroupLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="horizontal" /> </xs:restriction> </xs:simpleType> <!-- ## Group show attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] --> <xs:simpleType name="pigroupShow"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="incomplete" /> </xs:restriction> </xs:simpleType> <!-- ## Group collapse attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] --> <xs:simpleType name="piGroupCollapse"> <xs:restriction base="xs:string"> <xs:enumeration value="open" /> <xs:enumeration value="closed" /> </xs:restriction> </xs:simpleType> <!-- # Group element definition. # --> <xs:element name="group"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout" type="piGroupLayout" /> <xs:attribute name="show" type="pigroupShow" /> <xs:attribute name="collapse" type="piGroupCollapse" /> <xs:attribute name="row-items" type="xs:int" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Panel element definition. # --> <xs:element name="panel"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="section" /> <xs:element maxOccurs="unbounded" ref="header" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Section element definition. # --> <!-- Serves as tabbed group in panel container --> <xs:element name="section"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="label" /> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Header element definition. # --> <xs:element name="header"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Navigation element definition. # --> <xs:element name="navigation"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Title element definition. # --> <xs:element name="title"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Data element definitions. # --> <xs:element name="data"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="label" /> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="span" type="xs:string" /> <xs:attribute name="layout" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="label" type="xs:string" /> <xs:element name="format" type="xs:string" /> <xs:element name="default" type="xs:string" /> <!-- # Image element definitions. # --> <xs:element name="image"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="alt" /> <xs:element maxOccurs="1" ref="caption" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="alt"> <xs:complexType> <xs:choice> <xs:element ref="default" minOccurs="0" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="caption"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="format" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Infobox element definition. # --> <!-- Serves as infobox container & delimiter. --> <xs:element name="infobox"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout"> <xs:simpleType> <xs:restriction base="piInfoboxLayout" /> </xs:simpleType> </xs:attribute> <xs:attribute name="name" type="xs:string" /> <xs:attribute name="theme" type="xs:string" /> <xs:attribute name="theme-source" type="xs:string" /> <xs:attribute name="type" type="xs:string" /> <xs:attribute name="accent-color-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> | ||
| Actual | ||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- XML schema for Wikia's propietary XML syntax. --> <!-- For simplicity, this file does not include MediaWiki and HTML tags. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <!-- # Validator restrictions used in infobox attributes. # --> <!-- ## Infobox title color validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] --> <xs:simpleType name="piColor"> <xs:restriction base="xs:string"> <xs:pattern value="[a-f0-9]{3}([a-f0-9]{3})?)" /> </xs:restriction> </xs:simpleType> <!-- ## Infobox layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] --> <xs:simpleType name="piInfoboxLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="stacked" /> </xs:restriction> </xs:simpleType> <!-- ## Group layout attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] --> <xs:simpleType name="piGroupLayout"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="horizontal" /> </xs:restriction> </xs:simpleType> <!-- ## Group show attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] --> <xs:simpleType name="pigroupShow"> <xs:restriction base="xs:string"> <xs:enumeration value="default" /> <xs:enumeration value="incomplete" /> </xs:restriction> </xs:simpleType> <!-- ## Group collapse attribute validation. ## --> <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] --> <xs:simpleType name="piGroupCollapse"> <xs:restriction base="xs:string"> <xs:enumeration value="open" /> <xs:enumeration value="closed" /> </xs:restriction> </xs:simpleType> <!-- # Group element definition. # --> <xs:element name="group"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout" type="piGroupLayout" /> <xs:attribute name="show" type="pigroupShow" /> <xs:attribute name="collapse" type="piGroupCollapse" /> <xs:attribute name="row-items" type="xs:int" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Panel element definition. # --> <xs:element name="panel"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="section" /> <xs:element maxOccurs="unbounded" ref="header" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Section element definition. # --> <!-- Serves as tabbed group in panel container --> <xs:element name="section"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="label" /> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="header" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Header element definition. # --> <xs:element name="header"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Navigation element definition. # --> <xs:element name="navigation"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <!-- # Title element definition. # --> <xs:element name="title"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Data element definitions. # --> <xs:element name="data"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element ref="label" /> <xs:element ref="format" /> <xs:element ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> <xs:attribute name="span" type="xs:string" /> <xs:attribute name="layout" type="xs:string" /> <xs:attribute name="name" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="label" type="xs:string" /> <xs:element name="format" type="xs:string" /> <xs:element name="default" type="xs:string" /> <!-- # Image element definitions. # --> <xs:element name="image"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="alt" /> <xs:element maxOccurs="1" ref="caption" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="alt"> <xs:complexType> <xs:choice> <xs:element ref="default" minOccurs="0" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <xs:element name="caption"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="1" ref="format" /> <xs:element maxOccurs="1" ref="default" /> </xs:choice> <xs:attribute name="source" type="xs:string" /> </xs:complexType> </xs:element> <!-- # Infobox element definition. # --> <!-- Serves as infobox container & delimiter. --> <xs:element name="infobox"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element maxOccurs="unbounded" ref="group" /> <xs:element maxOccurs="unbounded" ref="panel" /> <xs:element maxOccurs="unbounded" ref="title" /> <xs:element maxOccurs="unbounded" ref="image" /> <xs:element maxOccurs="unbounded" ref="navigation" /> <xs:element maxOccurs="unbounded" ref="data" /> </xs:choice> <xs:attribute name="layout"> <xs:simpleType> <xs:restriction base="piInfoboxLayout" /> </xs:simpleType> </xs:attribute> <xs:attribute name="name" type="xs:string" /> <xs:attribute name="theme" type="xs:string" /> <xs:attribute name="theme-source" type="xs:string" /> <xs:attribute name="type" type="xs:string" /> <xs:attribute name="accent-color-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-source"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> <xs:attribute name="accent-color-text-default"> <xs:simpleType> <xs:restriction base="piColor" /> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:schema> | ||
| ||
|---|---|---|
| Status | Code | Differs at |
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- XML schema for Wikia's propietary XML syntax. -->\n<!-- For simplicity, this file does not include MediaWiki and HTML tags. -->\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n <!-- # Validator restrictions used in infobox attributes. # -->\n <!-- ## Infobox title color validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] -->\n <xs:simpleType name=\"piColor\">\n <xs:restriction base=\"xs:string\">\n <xs:pattern value=\"[a-f0-9]{3}([a-f0-9]{3})?)\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Infobox layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] -->\n <xs:simpleType name=\"piInfoboxLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"stacked\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] -->\n <xs:simpleType name=\"piGroupLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"horizontal\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group show attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] -->\n <xs:simpleType name=\"pigroupShow\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"incomplete\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group collapse attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] -->\n <xs:simpleType name=\"piGroupCollapse\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"open\" />\n <xs:enumeration value=\"closed\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- # Group element definition. # -->\n <xs:element name=\"group\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\" type=\"piGroupLayout\" />\n <xs:attribute name=\"show\" type=\"pigroupShow\" />\n <xs:attribute name=\"collapse\" type=\"piGroupCollapse\" />\n <xs:attribute name=\"row-items\" type=\"xs:int\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Panel element definition. # -->\n <xs:element name=\"panel\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"section\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Section element definition. # -->\n <!-- Serves as tabbed group in panel container -->\n <xs:element name=\"section\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"label\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Header element definition. # -->\n <xs:element name=\"header\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Navigation element definition. # -->\n <xs:element name=\"navigation\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Title element definition. # -->\n <xs:element name=\"title\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Data element definitions. # -->\n <xs:element name=\"data\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"label\" />\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"span\" type=\"xs:string\" />\n <xs:attribute name=\"layout\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"label\" type=\"xs:string\" />\n <xs:element name=\"format\" type=\"xs:string\" />\n <xs:element name=\"default\" type=\"xs:string\" />\n <!-- # Image element definitions. # -->\n <xs:element name=\"image\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"alt\" />\n <xs:element maxOccurs=\"1\" ref=\"caption\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"alt\">\n <xs:complexType>\n <xs:choice>\n <xs:element ref=\"default\" minOccurs=\"0\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"caption\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"format\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Infobox element definition. # -->\n <!-- Serves as infobox container & delimiter. -->\n <xs:element name=\"infobox\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\">\n <xs:simpleType>\n <xs:restriction base=\"piInfoboxLayout\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n <xs:attribute name=\"theme\" type=\"xs:string\" />\n <xs:attribute name=\"theme-source\" type=\"xs:string\" />\n <xs:attribute name=\"type\" type=\"xs:string\" />\n <xs:attribute name=\"accent-color-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n </xs:complexType>\n </xs:element>\n</xs:schema>") | ||
| Expected | ||
| { _attr = { ["xmlns:xs"] = "http://www.w3.org/2001/XMLSchema" }, _children = { { _text = "# Validator restrictions used in infobox attributes. #", _type = "COMMENT" }, { _text = "## Infobox title color validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]]", _type = "COMMENT" }, { _attr = { name = "piColor" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "[a-f0-9]{3}([a-f0-9]{3})?)" }, _children = { n = 0 }, _name = "xs:pattern", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Infobox layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]]", _type = "COMMENT" }, { _attr = { name = "piInfoboxLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "stacked" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]]", _type = "COMMENT" }, { _attr = { name = "piGroupLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "horizontal" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group show attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]]", _type = "COMMENT" }, { _attr = { name = "pigroupShow" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "incomplete" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group collapse attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]]", _type = "COMMENT" }, { _attr = { name = "piGroupCollapse" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "open" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "closed" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "# Group element definition. #", _type = "COMMENT" }, { _attr = { name = "group" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout", type = "piGroupLayout" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "show", type = "pigroupShow" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "collapse", type = "piGroupCollapse" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "row-items", type = "xs:int" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Panel element definition. #", _type = "COMMENT" }, { _attr = { name = "panel" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "section" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Section element definition. #", _type = "COMMENT" }, { _text = "Serves as tabbed group in panel container", _type = "COMMENT" }, { _attr = { name = "section" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Header element definition. #", _type = "COMMENT" }, { _attr = { name = "header" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Navigation element definition. #", _type = "COMMENT" }, { _attr = { name = "navigation" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Title element definition. #", _type = "COMMENT" }, { _attr = { name = "title" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Data element definitions. #", _type = "COMMENT" }, { _attr = { name = "data" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "span", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "layout", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "label", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "format", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "default", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Image element definitions. #", _type = "COMMENT" }, { _attr = { name = "image" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "alt" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "caption" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "alt" }, _children = { { _children = { { _children = { { _attr = { minOccurs = "0", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "caption" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Infobox element definition. #", _type = "COMMENT" }, { _text = "Serves as infobox container & delimiter.", _type = "COMMENT" }, { _attr = { name = "infobox" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout" }, _children = { { _children = { { _attr = { base = "piInfoboxLayout" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme-source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "type", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:schema", _type = "ELEMENT"} | ||
| Actual | ||
| { _attr = { ["xmlns:xs"] = "http://www.w3.org/2001/XMLSchema" }, _children = { { _text = "# Validator restrictions used in infobox attributes. #", _type = "COMMENT" }, { _text = "## Infobox title color validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]]", _type = "COMMENT" }, { _attr = { name = "piColor" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "[a-f0-9]{3}([a-f0-9]{3})?)" }, _children = { n = 0 }, _name = "xs:pattern", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Infobox layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]]", _type = "COMMENT" }, { _attr = { name = "piInfoboxLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "stacked" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group layout attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]]", _type = "COMMENT" }, { _attr = { name = "piGroupLayout" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "horizontal" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group show attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]]", _type = "COMMENT" }, { _attr = { name = "pigroupShow" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "default" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "incomplete" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "## Group collapse attribute validation. ##", _type = "COMMENT" }, { _text = "Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]]", _type = "COMMENT" }, { _attr = { name = "piGroupCollapse" }, _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { value = "open" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, { _attr = { value = "closed" }, _children = { n = 0 }, _name = "xs:enumeration", _type = "ELEMENT" }, n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, { _text = "# Group element definition. #", _type = "COMMENT" }, { _attr = { name = "group" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout", type = "piGroupLayout" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "show", type = "pigroupShow" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "collapse", type = "piGroupCollapse" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "row-items", type = "xs:int" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Panel element definition. #", _type = "COMMENT" }, { _attr = { name = "panel" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "section" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Section element definition. #", _type = "COMMENT" }, { _text = "Serves as tabbed group in panel container", _type = "COMMENT" }, { _attr = { name = "section" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "header" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Header element definition. #", _type = "COMMENT" }, { _attr = { name = "header" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Navigation element definition. #", _type = "COMMENT" }, { _attr = { name = "navigation" }, _children = { { _children = { { _children = { { _attr = { base = "xs:string" }, _children = { { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:extension", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleContent", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Title element definition. #", _type = "COMMENT" }, { _attr = { name = "title" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Data element definitions. #", _type = "COMMENT" }, { _attr = { name = "data" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { ref = "label" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "span", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "layout", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "label", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "format", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "default", type = "xs:string" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Image element definitions. #", _type = "COMMENT" }, { _attr = { name = "image" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "alt" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "caption" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "alt" }, _children = { { _children = { { _children = { { _attr = { minOccurs = "0", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { name = "caption" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "1", ref = "format" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "1", ref = "default" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _text = "# Infobox element definition. #", _type = "COMMENT" }, { _text = "Serves as infobox container & delimiter.", _type = "COMMENT" }, { _attr = { name = "infobox" }, _children = { { _children = { { _attr = { maxOccurs = "unbounded" }, _children = { { _attr = { maxOccurs = "unbounded", ref = "group" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "panel" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "title" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "image" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "navigation" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, { _attr = { maxOccurs = "unbounded", ref = "data" }, _children = { n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:choice", _type = "ELEMENT" }, { _attr = { name = "layout" }, _children = { { _children = { { _attr = { base = "piInfoboxLayout" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "name", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "theme-source", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "type", type = "xs:string" }, _children = { n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-source" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, { _attr = { name = "accent-color-text-default" }, _children = { { _children = { { _attr = { base = "piColor" }, _children = { n = 0 }, _name = "xs:restriction", _type = "ELEMENT" }, n = 0 }, _name = "xs:simpleType", _type = "ELEMENT" }, n = 0 }, _name = "xs:attribute", _type = "ELEMENT" }, n = 0 }, _name = "xs:complexType", _type = "ELEMENT" }, n = 0 }, _name = "xs:element", _type = "ELEMENT" }, n = 0 }, _name = "xs:schema", _type = "ELEMENT"} | ||
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx -->\n<catalog>\n <book>\n <author>Gambardella, Matthew</author>\n <title>XML Developer's Guide</title>\n <genre>Computer</genre>\n <price>44.95</price>\n <publish_date>2000-10-01</publish_date>\n <description>An in-depth look at creating applications \n with XML.</description>\n </book>\n <book>\n <author>Ralls, Kim</author>\n <title>Midnight Rain</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-12-16</publish_date>\n <description>A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.</description>\n </book>\n <book>\n <author>Corets, Eva</author>\n <title>Maeve Ascendant</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-11-17</publish_date>\n <description>After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.</description>\n </book>\n</catalog>") | ||
| Expected | ||
| { _children = { { _children = { { _children = { { _text = "Gambardella, Matthew", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "XML Developer's Guide", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Computer", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "44.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-10-01", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "An in-depth look at creating applications \n with XML.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Ralls, Kim", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Midnight Rain", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-12-16", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Corets, Eva", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Maeve Ascendant", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-11-17", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, n = 0 }, _name = "catalog", _type = "ELEMENT"} | ||
| Actual | ||
| { _children = { { _children = { { _children = { { _text = "Gambardella, Matthew", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "XML Developer's Guide", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Computer", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "44.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-10-01", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "An in-depth look at creating applications \n with XML.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Ralls, Kim", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Midnight Rain", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-12-16", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, { _children = { { _children = { { _text = "Corets, Eva", _type = "TEXT" }, n = 0 }, _name = "author", _type = "ELEMENT" }, { _children = { { _text = "Maeve Ascendant", _type = "TEXT" }, n = 0 }, _name = "title", _type = "ELEMENT" }, { _children = { { _text = "Fantasy", _type = "TEXT" }, n = 0 }, _name = "genre", _type = "ELEMENT" }, { _children = { { _text = "5.95", _type = "TEXT" }, n = 0 }, _name = "price", _type = "ELEMENT" }, { _children = { { _text = "2000-11-17", _type = "TEXT" }, n = 0 }, _name = "publish_date", _type = "ELEMENT" }, { _children = { { _text = "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", _type = "TEXT" }, n = 0 }, _name = "description", _type = "ELEMENT" }, n = 0 }, _name = "book", _type = "ELEMENT" }, n = 0 }, _name = "catalog", _type = "ELEMENT"} | ||
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx -->\n<catalog>\n <book>\n <author>Gambardella, Matthew</author>\n <title>XML Developer's Guide</title>\n <genre>Computer</genre>\n <price>44.95</price>\n <publish_date>2000-10-01</publish_date>\n <description>An in-depth look at creating applications \n with XML.</description>\n </book>\n <book>\n <author>Ralls, Kim</author>\n <title>Midnight Rain</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-12-16</publish_date>\n <description>A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.</description>\n </book>\n <book>\n <author>Corets, Eva</author>\n <title>Maeve Ascendant</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-11-17</publish_date>\n <description>After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.</description>\n </book>\n</catalog>", "Tree") | ||
| Expected | ||
| { catalog = { book = { { author = "Gambardella, Matthew", description = "An in-depth look at creating applications \n with XML.", genre = "Computer", price = "44.95", publish_date = "2000-10-01", title = "XML Developer's Guide" }, { author = "Ralls, Kim", description = "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", genre = "Fantasy", price = "5.95", publish_date = "2000-12-16", title = "Midnight Rain" }, { author = "Corets, Eva", description = "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", genre = "Fantasy", price = "5.95", publish_date = "2000-11-17", title = "Maeve Ascendant" } } }} | ||
| Actual | ||
| { catalog = { book = { { author = "Gambardella, Matthew", description = "An in-depth look at creating applications \n with XML.", genre = "Computer", price = "44.95", publish_date = "2000-10-01", title = "XML Developer's Guide" }, { author = "Ralls, Kim", description = "A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.", genre = "Fantasy", price = "5.95", publish_date = "2000-12-16", title = "Midnight Rain" }, { author = "Corets, Eva", description = "After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.", genre = "Fantasy", price = "5.95", publish_date = "2000-11-17", title = "Maeve Ascendant" } } }} | ||
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx -->\n<catalog>\n <book>\n <author>Gambardella, Matthew</author>\n <title>XML Developer's Guide</title>\n <genre>Computer</genre>\n <price>44.95</price>\n <publish_date>2000-10-01</publish_date>\n <description>An in-depth look at creating applications \n with XML.</description>\n </book>\n <book>\n <author>Ralls, Kim</author>\n <title>Midnight Rain</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-12-16</publish_date>\n <description>A former architect battles corporate zombies, \n an evil sorceress, and her own childhood to become queen \n of the world.</description>\n </book>\n <book>\n <author>Corets, Eva</author>\n <title>Maeve Ascendant</title>\n <genre>Fantasy</genre>\n <price>5.95</price>\n <publish_date>2000-11-17</publish_date>\n <description>After the collapse of a nanotechnology \n society in England, the young survivors lay the \n foundation for a new society.</description>\n </book>\n</catalog>", "Print") | ||
| Expected | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx Start : catalog Start : book Start : author Text : Gambardella, Matthew End : author Start : title Text : XML Developer's Guide End : title Start : genre Text : Computer End : genre Start : price Text : 44.95 End : price Start : publish_date Text : 2000-10-01 End : publish_date Start : description Text : An in-depth look at creating applications with XML. End : description End : book Start : book Start : author Text : Ralls, Kim End : author Start : title Text : Midnight Rain End : title Start : genre Text : Fantasy End : genre Start : price Text : 5.95 End : price Start : publish_date Text : 2000-12-16 End : publish_date Start : description Text : A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world. End : description End : book Start : book Start : author Text : Corets, Eva End : author Start : title Text : Maeve Ascendant End : title Start : genre Text : Fantasy End : genre Start : price Text : 5.95 End : price Start : publish_date Text : 2000-11-17 End : publish_date Start : description Text : After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society. End : description End : book End : catalog | ||
| Actual | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : Source: https://msdn.microsoft.com/en-us/library/ms762271(v=vs.85).aspx Start : catalog Start : book Start : author Text : Gambardella, Matthew End : author Start : title Text : XML Developer's Guide End : title Start : genre Text : Computer End : genre Start : price Text : 44.95 End : price Start : publish_date Text : 2000-10-01 End : publish_date Start : description Text : An in-depth look at creating applications with XML. End : description End : book Start : book Start : author Text : Ralls, Kim End : author Start : title Text : Midnight Rain End : title Start : genre Text : Fantasy End : genre Start : price Text : 5.95 End : price Start : publish_date Text : 2000-12-16 End : publish_date Start : description Text : A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world. End : description End : book Start : book Start : author Text : Corets, Eva End : author Start : title Text : Maeve Ascendant End : title Start : genre Text : Fantasy End : genre Start : price Text : 5.95 End : price Start : publish_date Text : 2000-11-17 End : publish_date Start : description Text : After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society. End : description End : book End : catalog | ||
p.parse('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!-- Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml -->\n<people>\n <person type="natural">\n <![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]> \n \n <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. -->\n \n <name>Manoel</name>\n <city>Palmas-TO</city>\n </person>\n <person type="natural">\n <name>Breno</name>\n <city>Palmas-TO</city>\n </person>\n <person type="legal">\n <name>University of Brasília</name>\n <city>Brasília-DF</city>\n </person> \n</people>') | ||
| Expected | ||
| { _children = { { _attr = { type = "natural" }, _children = { { _text = "<![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]>", _type = "TEXT" }, { _text = "Just an example comment that will be ignored by the tree handler and processed by the other ones.", _type = "COMMENT" }, { _children = { { _text = "Manoel", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "natural" }, _children = { { _children = { { _text = "Breno", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "legal" }, _children = { { _children = { { _text = "University of Brasília", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Brasília-DF", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, n = 0 }, _name = "people", _type = "ELEMENT"} | ||
| Actual | ||
| { _children = { { _attr = { type = "natural" }, _children = { { _text = "<![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]>", _type = "TEXT" }, { _text = "Just an example comment that will be ignored by the tree handler and processed by the other ones.", _type = "COMMENT" }, { _children = { { _text = "Manoel", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "natural" }, _children = { { _children = { { _text = "Breno", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Palmas-TO", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, { _attr = { type = "legal" }, _children = { { _children = { { _text = "University of Brasília", _type = "TEXT" }, n = 0 }, _name = "name", _type = "ELEMENT" }, { _children = { { _text = "Brasília-DF", _type = "TEXT" }, n = 0 }, _name = "city", _type = "ELEMENT" }, n = 0 }, _name = "person", _type = "ELEMENT" }, n = 0 }, _name = "people", _type = "ELEMENT"} | ||
p.parse('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!-- Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml -->\n<people>\n <person type="natural">\n <![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]> \n \n <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. -->\n \n <name>Manoel</name>\n <city>Palmas-TO</city>\n </person>\n <person type="natural">\n <name>Breno</name>\n <city>Palmas-TO</city>\n </person>\n <person type="legal">\n <name>University of Brasília</name>\n <city>Brasília-DF</city>\n </person> \n</people>', "Tree") | ||
| Expected | ||
| { people = { person = { { "<![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]>", _attr = { type = "natural" }, city = "Palmas-TO", name = "Manoel" }, { _attr = { type = "natural" }, city = "Palmas-TO", name = "Breno" }, { _attr = { type = "legal" }, city = "Brasília-DF", name = "University of Brasília" } } }} | ||
| Actual | ||
| { people = { person = { { "<![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]>", _attr = { type = "natural" }, city = "Palmas-TO", name = "Manoel" }, { _attr = { type = "natural" }, city = "Palmas-TO", name = "Breno" }, { _attr = { type = "legal" }, city = "Brasília-DF", name = "University of Brasília" } } }} | ||
p.parse('<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n<!-- Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml -->\n<people>\n <person type="natural">\n <![CDATA[\n Just a CDATA tag that may contain anything, including XML code,\n such as <tag>message</tag>.\n Its content is extracted but not processed.\n ]]> \n \n <!-- Just an example comment that will be ignored by the tree handler and processed by the other ones. -->\n \n <name>Manoel</name>\n <city>Palmas-TO</city>\n </person>\n <person type="natural">\n <name>Breno</name>\n <city>Palmas-TO</city>\n </person>\n <person type="legal">\n <name>University of Brasília</name>\n <city>Brasília-DF</city>\n </person> \n</people>', "Print") | ||
| Expected | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml Start : people Start : person + type="natural" CDATA : Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. Comment : Just an example comment that will be ignored by the tree handler and processed by the other ones. Start : name Text : Manoel End : name Start : city Text : Palmas-TO End : city End : person Start : person + type="natural" Start : name Text : Breno End : name Start : city Text : Palmas-TO End : city End : person Start : person + type="legal" Start : name Text : University of Brasília End : name Start : city Text : Brasília-DF End : city End : person End : people | ||
| Actual | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : Source: https://github.com/manoelcampos/xml2lua/blob/master/people.xml Start : people Start : person + type="natural" CDATA : Just a CDATA tag that may contain anything, including XML code, such as <tag>message</tag>. Its content is extracted but not processed. Comment : Just an example comment that will be ignored by the tree handler and processed by the other ones. Start : name Text : Manoel End : name Start : city Text : Palmas-TO End : city End : person Start : person + type="natural" Start : name Text : Breno End : name Start : city Text : Palmas-TO End : city End : person Start : person + type="legal" Start : name Text : University of Brasília End : name Start : city Text : Brasília-DF End : city End : person End : people | ||
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- XML schema for Wikia's propietary XML syntax. -->\n<!-- For simplicity, this file does not include MediaWiki and HTML tags. -->\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n <!-- # Validator restrictions used in infobox attributes. # -->\n <!-- ## Infobox title color validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] -->\n <xs:simpleType name=\"piColor\">\n <xs:restriction base=\"xs:string\">\n <xs:pattern value=\"[a-f0-9]{3}([a-f0-9]{3})?)\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Infobox layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] -->\n <xs:simpleType name=\"piInfoboxLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"stacked\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] -->\n <xs:simpleType name=\"piGroupLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"horizontal\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group show attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] -->\n <xs:simpleType name=\"pigroupShow\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"incomplete\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group collapse attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] -->\n <xs:simpleType name=\"piGroupCollapse\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"open\" />\n <xs:enumeration value=\"closed\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- # Group element definition. # -->\n <xs:element name=\"group\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\" type=\"piGroupLayout\" />\n <xs:attribute name=\"show\" type=\"pigroupShow\" />\n <xs:attribute name=\"collapse\" type=\"piGroupCollapse\" />\n <xs:attribute name=\"row-items\" type=\"xs:int\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Panel element definition. # -->\n <xs:element name=\"panel\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"section\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Section element definition. # -->\n <!-- Serves as tabbed group in panel container -->\n <xs:element name=\"section\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"label\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Header element definition. # -->\n <xs:element name=\"header\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Navigation element definition. # -->\n <xs:element name=\"navigation\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Title element definition. # -->\n <xs:element name=\"title\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Data element definitions. # -->\n <xs:element name=\"data\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"label\" />\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"span\" type=\"xs:string\" />\n <xs:attribute name=\"layout\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"label\" type=\"xs:string\" />\n <xs:element name=\"format\" type=\"xs:string\" />\n <xs:element name=\"default\" type=\"xs:string\" />\n <!-- # Image element definitions. # -->\n <xs:element name=\"image\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"alt\" />\n <xs:element maxOccurs=\"1\" ref=\"caption\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"alt\">\n <xs:complexType>\n <xs:choice>\n <xs:element ref=\"default\" minOccurs=\"0\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"caption\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"format\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Infobox element definition. # -->\n <!-- Serves as infobox container & delimiter. -->\n <xs:element name=\"infobox\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\">\n <xs:simpleType>\n <xs:restriction base=\"piInfoboxLayout\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n <xs:attribute name=\"theme\" type=\"xs:string\" />\n <xs:attribute name=\"theme-source\" type=\"xs:string\" />\n <xs:attribute name=\"type\" type=\"xs:string\" />\n <xs:attribute name=\"accent-color-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n </xs:complexType>\n </xs:element>\n</xs:schema>", "Tree") | ||
| Expected | ||
| { ["xs:schema"] = { _attr = { ["xmlns:xs"] = "http://www.w3.org/2001/XMLSchema" }, ["xs:element"] = { { _attr = { name = "group" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "layout", type = "piGroupLayout" } }, { _attr = { name = "show", type = "pigroupShow" } }, { _attr = { name = "collapse", type = "piGroupCollapse" } }, { _attr = { name = "row-items", type = "xs:int" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "panel" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } }, { _attr = { name = "panel" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "section" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } } } } } }, { _attr = { name = "section" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "label" } }, { _attr = { maxOccurs = "unbounded", ref = "group" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } }, { _attr = { name = "header" }, ["xs:complexType"] = { ["xs:simpleContent"] = { ["xs:extension"] = { _attr = { base = "xs:string" }, ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } } } } } }, { _attr = { name = "navigation" }, ["xs:complexType"] = { ["xs:simpleContent"] = { ["xs:extension"] = { _attr = { base = "xs:string" }, ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } } } } } }, { _attr = { name = "title" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "source", type = "xs:string" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { ref = "format" } }, { _attr = { ref = "default" } } } } } }, { _attr = { name = "data" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "source", type = "xs:string" } }, { _attr = { name = "span", type = "xs:string" } }, { _attr = { name = "layout", type = "xs:string" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { ref = "label" } }, { _attr = { ref = "format" } }, { _attr = { ref = "default" } } } } } }, { _attr = { name = "label", type = "xs:string" } }, { _attr = { name = "format", type = "xs:string" } }, { _attr = { name = "default", type = "xs:string" } }, { _attr = { name = "image" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "alt" } }, { _attr = { maxOccurs = "1", ref = "caption" } }, { _attr = { maxOccurs = "1", ref = "default" } } } } } }, { _attr = { name = "alt" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { ["xs:element"] = { _attr = { minOccurs = "0", ref = "default" } } } } }, { _attr = { name = "caption" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "format" } }, { _attr = { maxOccurs = "1", ref = "default" } } } } } }, { _attr = { name = "infobox" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "layout" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piInfoboxLayout" } } } }, { _attr = { name = "name", type = "xs:string" } }, { _attr = { name = "theme", type = "xs:string" } }, { _attr = { name = "theme-source", type = "xs:string" } }, { _attr = { name = "type", type = "xs:string" } }, { _attr = { name = "accent-color-source" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-default" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-text-source" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-text-default" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "group" } }, { _attr = { maxOccurs = "unbounded", ref = "panel" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } } }, ["xs:simpleType"] = { { _attr = { name = "piColor" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:pattern"] = { _attr = { value = "[a-f0-9]{3}([a-f0-9]{3})?)" } } } }, { _attr = { name = "piInfoboxLayout" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "stacked" } } } } }, { _attr = { name = "piGroupLayout" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "horizontal" } } } } }, { _attr = { name = "pigroupShow" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "incomplete" } } } } }, { _attr = { name = "piGroupCollapse" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "open" } }, { _attr = { value = "closed" } } } } } } }} | ||
| Actual | ||
| { ["xs:schema"] = { _attr = { ["xmlns:xs"] = "http://www.w3.org/2001/XMLSchema" }, ["xs:element"] = { { _attr = { name = "group" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "layout", type = "piGroupLayout" } }, { _attr = { name = "show", type = "pigroupShow" } }, { _attr = { name = "collapse", type = "piGroupCollapse" } }, { _attr = { name = "row-items", type = "xs:int" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "panel" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } }, { _attr = { name = "panel" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "section" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } } } } } }, { _attr = { name = "section" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "label" } }, { _attr = { maxOccurs = "unbounded", ref = "group" } }, { _attr = { maxOccurs = "unbounded", ref = "header" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } }, { _attr = { name = "header" }, ["xs:complexType"] = { ["xs:simpleContent"] = { ["xs:extension"] = { _attr = { base = "xs:string" }, ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } } } } } }, { _attr = { name = "navigation" }, ["xs:complexType"] = { ["xs:simpleContent"] = { ["xs:extension"] = { _attr = { base = "xs:string" }, ["xs:attribute"] = { _attr = { name = "name", type = "xs:string" } } } } } }, { _attr = { name = "title" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "source", type = "xs:string" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { ref = "format" } }, { _attr = { ref = "default" } } } } } }, { _attr = { name = "data" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "source", type = "xs:string" } }, { _attr = { name = "span", type = "xs:string" } }, { _attr = { name = "layout", type = "xs:string" } }, { _attr = { name = "name", type = "xs:string" } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { ref = "label" } }, { _attr = { ref = "format" } }, { _attr = { ref = "default" } } } } } }, { _attr = { name = "label", type = "xs:string" } }, { _attr = { name = "format", type = "xs:string" } }, { _attr = { name = "default", type = "xs:string" } }, { _attr = { name = "image" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "alt" } }, { _attr = { maxOccurs = "1", ref = "caption" } }, { _attr = { maxOccurs = "1", ref = "default" } } } } } }, { _attr = { name = "alt" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { ["xs:element"] = { _attr = { minOccurs = "0", ref = "default" } } } } }, { _attr = { name = "caption" }, ["xs:complexType"] = { ["xs:attribute"] = { _attr = { name = "source", type = "xs:string" } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "1", ref = "format" } }, { _attr = { maxOccurs = "1", ref = "default" } } } } } }, { _attr = { name = "infobox" }, ["xs:complexType"] = { ["xs:attribute"] = { { _attr = { name = "layout" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piInfoboxLayout" } } } }, { _attr = { name = "name", type = "xs:string" } }, { _attr = { name = "theme", type = "xs:string" } }, { _attr = { name = "theme-source", type = "xs:string" } }, { _attr = { name = "type", type = "xs:string" } }, { _attr = { name = "accent-color-source" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-default" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-text-source" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } }, { _attr = { name = "accent-color-text-default" }, ["xs:simpleType"] = { ["xs:restriction"] = { _attr = { base = "piColor" } } } } }, ["xs:choice"] = { _attr = { maxOccurs = "unbounded" }, ["xs:element"] = { { _attr = { maxOccurs = "unbounded", ref = "group" } }, { _attr = { maxOccurs = "unbounded", ref = "panel" } }, { _attr = { maxOccurs = "unbounded", ref = "title" } }, { _attr = { maxOccurs = "unbounded", ref = "image" } }, { _attr = { maxOccurs = "unbounded", ref = "navigation" } }, { _attr = { maxOccurs = "unbounded", ref = "data" } } } } } } }, ["xs:simpleType"] = { { _attr = { name = "piColor" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:pattern"] = { _attr = { value = "[a-f0-9]{3}([a-f0-9]{3})?)" } } } }, { _attr = { name = "piInfoboxLayout" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "stacked" } } } } }, { _attr = { name = "piGroupLayout" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "horizontal" } } } } }, { _attr = { name = "pigroupShow" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "default" } }, { _attr = { value = "incomplete" } } } } }, { _attr = { name = "piGroupCollapse" }, ["xs:restriction"] = { _attr = { base = "xs:string" }, ["xs:enumeration"] = { { _attr = { value = "open" } }, { _attr = { value = "closed" } } } } } } }} | ||
p.parse("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<!-- XML schema for Wikia's propietary XML syntax. -->\n<!-- For simplicity, this file does not include MediaWiki and HTML tags. -->\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n <!-- # Validator restrictions used in infobox attributes. # -->\n <!-- ## Infobox title color validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] -->\n <xs:simpleType name=\"piColor\">\n <xs:restriction base=\"xs:string\">\n <xs:pattern value=\"[a-f0-9]{3}([a-f0-9]{3})?)\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Infobox layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] -->\n <xs:simpleType name=\"piInfoboxLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"stacked\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group layout attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] -->\n <xs:simpleType name=\"piGroupLayout\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"horizontal\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group show attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] -->\n <xs:simpleType name=\"pigroupShow\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"default\" />\n <xs:enumeration value=\"incomplete\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- ## Group collapse attribute validation. ## -->\n <!-- Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] -->\n <xs:simpleType name=\"piGroupCollapse\">\n <xs:restriction base=\"xs:string\">\n <xs:enumeration value=\"open\" />\n <xs:enumeration value=\"closed\" />\n </xs:restriction>\n </xs:simpleType>\n <!-- # Group element definition. # -->\n <xs:element name=\"group\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\" type=\"piGroupLayout\" />\n <xs:attribute name=\"show\" type=\"pigroupShow\" />\n <xs:attribute name=\"collapse\" type=\"piGroupCollapse\" />\n <xs:attribute name=\"row-items\" type=\"xs:int\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Panel element definition. # -->\n <xs:element name=\"panel\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"section\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Section element definition. # -->\n <!-- Serves as tabbed group in panel container -->\n <xs:element name=\"section\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"label\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"header\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Header element definition. # -->\n <xs:element name=\"header\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Navigation element definition. # -->\n <xs:element name=\"navigation\">\n <xs:complexType>\n <xs:simpleContent>\n <xs:extension base=\"xs:string\">\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:extension>\n </xs:simpleContent>\n </xs:complexType>\n </xs:element>\n <!-- # Title element definition. # -->\n <xs:element name=\"title\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Data element definitions. # -->\n <xs:element name=\"data\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element ref=\"label\" />\n <xs:element ref=\"format\" />\n <xs:element ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n <xs:attribute name=\"span\" type=\"xs:string\" />\n <xs:attribute name=\"layout\" type=\"xs:string\" />\n <xs:attribute name=\"name\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"label\" type=\"xs:string\" />\n <xs:element name=\"format\" type=\"xs:string\" />\n <xs:element name=\"default\" type=\"xs:string\" />\n <!-- # Image element definitions. # -->\n <xs:element name=\"image\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"alt\" />\n <xs:element maxOccurs=\"1\" ref=\"caption\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"alt\">\n <xs:complexType>\n <xs:choice>\n <xs:element ref=\"default\" minOccurs=\"0\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <xs:element name=\"caption\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"1\" ref=\"format\" />\n <xs:element maxOccurs=\"1\" ref=\"default\" />\n </xs:choice>\n <xs:attribute name=\"source\" type=\"xs:string\" />\n </xs:complexType>\n </xs:element>\n <!-- # Infobox element definition. # -->\n <!-- Serves as infobox container & delimiter. -->\n <xs:element name=\"infobox\">\n <xs:complexType>\n <xs:choice maxOccurs=\"unbounded\">\n <xs:element maxOccurs=\"unbounded\" ref=\"group\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"panel\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"title\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"image\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"navigation\" />\n <xs:element maxOccurs=\"unbounded\" ref=\"data\" />\n </xs:choice>\n <xs:attribute name=\"layout\">\n <xs:simpleType>\n <xs:restriction base=\"piInfoboxLayout\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"name\" type=\"xs:string\" />\n <xs:attribute name=\"theme\" type=\"xs:string\" />\n <xs:attribute name=\"theme-source\" type=\"xs:string\" />\n <xs:attribute name=\"type\" type=\"xs:string\" />\n <xs:attribute name=\"accent-color-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-source\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n <xs:attribute name=\"accent-color-text-default\">\n <xs:simpleType>\n <xs:restriction base=\"piColor\" />\n </xs:simpleType>\n </xs:attribute>\n </xs:complexType>\n </xs:element>\n</xs:schema>", "Print") | ||
| Expected | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : XML schema for Wikia's propietary XML syntax. Comment : For simplicity, this file does not include MediaWiki and HTML tags. Start : xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" Comment : # Validator restrictions used in infobox attributes. # Comment : ## Infobox title color validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] Start : xs:simpleType + name="piColor" Start : xs:restriction + base="xs:string" Start : xs:pattern + value="[a-f0-9]{3}([a-f0-9]{3})?)" End : xs:pattern End : xs:restriction End : xs:simpleType Comment : ## Infobox layout attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] Start : xs:simpleType + name="piInfoboxLayout" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="stacked" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group layout attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] Start : xs:simpleType + name="piGroupLayout" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="horizontal" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group show attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] Start : xs:simpleType + name="pigroupShow" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="incomplete" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group collapse attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] Start : xs:simpleType + name="piGroupCollapse" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="open" End : xs:enumeration Start : xs:enumeration + value="closed" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : # Group element definition. # Start : xs:element + name="group" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="panel" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="piGroupLayout" + name="layout" End : xs:attribute Start : xs:attribute + type="pigroupShow" + name="show" End : xs:attribute Start : xs:attribute + type="piGroupCollapse" + name="collapse" End : xs:attribute Start : xs:attribute + type="xs:int" + name="row-items" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Panel element definition. # Start : xs:element + name="panel" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="section" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Section element definition. # Comment : Serves as tabbed group in panel container Start : xs:element + name="section" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="label" + maxOccurs="1" End : xs:element Start : xs:element + ref="group" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Header element definition. # Start : xs:element + name="header" Start : xs:complexType Start : xs:simpleContent Start : xs:extension + base="xs:string" Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:extension End : xs:simpleContent End : xs:complexType End : xs:element Comment : # Navigation element definition. # Start : xs:element + name="navigation" Start : xs:complexType Start : xs:simpleContent Start : xs:extension + base="xs:string" Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:extension End : xs:simpleContent End : xs:complexType End : xs:element Comment : # Title element definition. # Start : xs:element + name="title" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="format" End : xs:element Start : xs:element + ref="default" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Data element definitions. # Start : xs:element + name="data" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="label" End : xs:element Start : xs:element + ref="format" End : xs:element Start : xs:element + ref="default" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="span" End : xs:attribute Start : xs:attribute + type="xs:string" + name="layout" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + type="xs:string" + name="label" End : xs:element Start : xs:element + type="xs:string" + name="format" End : xs:element Start : xs:element + type="xs:string" + name="default" End : xs:element Comment : # Image element definitions. # Start : xs:element + name="image" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="alt" + maxOccurs="1" End : xs:element Start : xs:element + ref="caption" + maxOccurs="1" End : xs:element Start : xs:element + ref="default" + maxOccurs="1" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + name="alt" Start : xs:complexType Start : xs:choice Start : xs:element + ref="default" + minOccurs="0" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + name="caption" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="format" + maxOccurs="1" End : xs:element Start : xs:element + ref="default" + maxOccurs="1" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Comment : # Infobox element definition. # Comment : Serves as infobox container & delimiter. Start : xs:element + name="infobox" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="group" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="panel" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + name="layout" Start : xs:simpleType Start : xs:restriction + base="piInfoboxLayout" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute Start : xs:attribute + type="xs:string" + name="theme" End : xs:attribute Start : xs:attribute + type="xs:string" + name="theme-source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="type" End : xs:attribute Start : xs:attribute + name="accent-color-source" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-default" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-text-source" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-text-default" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute End : xs:complexType End : xs:element End : xs:schema | ||
| Actual | ||
|
XML Decl : xml + version="1.0" + encoding="UTF-8" + standalone="no" Comment : XML schema for Wikia's propietary XML syntax. Comment : For simplicity, this file does not include MediaWiki and HTML tags. Start : xs:schema + xmlns:xs="http://www.w3.org/2001/XMLSchema" Comment : # Validator restrictions used in infobox attributes. # Comment : ## Infobox title color validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L45]] Start : xs:simpleType + name="piColor" Start : xs:restriction + base="xs:string" Start : xs:pattern + value="[a-f0-9]{3}([a-f0-9]{3})?)" End : xs:pattern End : xs:restriction End : xs:simpleType Comment : ## Infobox layout attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Helpers/InfoboxParamsValidator.php#L54]] Start : xs:simpleType + name="piInfoboxLayout" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="stacked" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group layout attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L7]] Start : xs:simpleType + name="piGroupLayout" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="horizontal" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group show attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L9]] Start : xs:simpleType + name="pigroupShow" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="default" End : xs:enumeration Start : xs:enumeration + value="incomplete" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : ## Group collapse attribute validation. ## Comment : Source: [[github:Wikia/app/blob/release-1073.001/extensions/wikia/PortableInfobox/services/Parser/Nodes/NodeGroup.php#L12]] Start : xs:simpleType + name="piGroupCollapse" Start : xs:restriction + base="xs:string" Start : xs:enumeration + value="open" End : xs:enumeration Start : xs:enumeration + value="closed" End : xs:enumeration End : xs:restriction End : xs:simpleType Comment : # Group element definition. # Start : xs:element + name="group" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="panel" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="piGroupLayout" + name="layout" End : xs:attribute Start : xs:attribute + type="pigroupShow" + name="show" End : xs:attribute Start : xs:attribute + type="piGroupCollapse" + name="collapse" End : xs:attribute Start : xs:attribute + type="xs:int" + name="row-items" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Panel element definition. # Start : xs:element + name="panel" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="section" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Section element definition. # Comment : Serves as tabbed group in panel container Start : xs:element + name="section" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="label" + maxOccurs="1" End : xs:element Start : xs:element + ref="group" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="header" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Header element definition. # Start : xs:element + name="header" Start : xs:complexType Start : xs:simpleContent Start : xs:extension + base="xs:string" Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:extension End : xs:simpleContent End : xs:complexType End : xs:element Comment : # Navigation element definition. # Start : xs:element + name="navigation" Start : xs:complexType Start : xs:simpleContent Start : xs:extension + base="xs:string" Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:extension End : xs:simpleContent End : xs:complexType End : xs:element Comment : # Title element definition. # Start : xs:element + name="title" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="format" End : xs:element Start : xs:element + ref="default" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Comment : # Data element definitions. # Start : xs:element + name="data" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="label" End : xs:element Start : xs:element + ref="format" End : xs:element Start : xs:element + ref="default" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="span" End : xs:attribute Start : xs:attribute + type="xs:string" + name="layout" End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + type="xs:string" + name="label" End : xs:element Start : xs:element + type="xs:string" + name="format" End : xs:element Start : xs:element + type="xs:string" + name="default" End : xs:element Comment : # Image element definitions. # Start : xs:element + name="image" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="alt" + maxOccurs="1" End : xs:element Start : xs:element + ref="caption" + maxOccurs="1" End : xs:element Start : xs:element + ref="default" + maxOccurs="1" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + name="alt" Start : xs:complexType Start : xs:choice Start : xs:element + ref="default" + minOccurs="0" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Start : xs:element + name="caption" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="format" + maxOccurs="1" End : xs:element Start : xs:element + ref="default" + maxOccurs="1" End : xs:element End : xs:choice Start : xs:attribute + type="xs:string" + name="source" End : xs:attribute End : xs:complexType End : xs:element Comment : # Infobox element definition. # Comment : Serves as infobox container & delimiter. Start : xs:element + name="infobox" Start : xs:complexType Start : xs:choice + maxOccurs="unbounded" Start : xs:element + ref="group" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="panel" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="title" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="image" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="navigation" + maxOccurs="unbounded" End : xs:element Start : xs:element + ref="data" + maxOccurs="unbounded" End : xs:element End : xs:choice Start : xs:attribute + name="layout" Start : xs:simpleType Start : xs:restriction + base="piInfoboxLayout" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + type="xs:string" + name="name" End : xs:attribute Start : xs:attribute + type="xs:string" + name="theme" End : xs:attribute Start : xs:attribute + type="xs:string" + name="theme-source" End : xs:attribute Start : xs:attribute + type="xs:string" + name="type" End : xs:attribute Start : xs:attribute + name="accent-color-source" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-default" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-text-source" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute Start : xs:attribute + name="accent-color-text-default" Start : xs:simpleType Start : xs:restriction + base="piColor" End : xs:restriction End : xs:simpleType End : xs:attribute End : xs:complexType End : xs:element End : xs:schema | ||