git.iko.soy/typeable/xsd-parser
on master help sign in
Fix complexType handling
commit99c921638164062be7779da9a9da95333f0eddf0 authorDenis Redozubov <denis.redozubov@gmail.com> dateFri 4 Oct 2019, 16:54 (7 years ago) parent1c51bb1
1 file changed+2−2
src/Text/XSD/Parser.hs+2−2
src/Text/XSD/Parser.hs+2−2
@@ -112,8 +112,7 @@ toElem cursor = do
112112 childCursor <- maybeThrowXsd (safeHead complexType)
113113 $ "More than one xs:complexType tag in: " <> show cursor
114114 let name = safeHead $ childCursor $| attribute "name"
115− InlineComplex . TypeComplex . ComplexType name CTSequence
116− <$> toElemsAndDatatypes childCursor
115+ InlineComplex . TypeComplex <$> toComplexType childCursor
117116 pure $ XSD.Element
118117 { name = (ns, name)
119118 , xtype = datatypeRef }
@@ -135,6 +134,7 @@ toSimpleType :: Cursor -> XSDMonad SimpleType
135134toSimpleType cursor = do
136135 error "TODO: implement toSimpleType"
137136
137+-- | Takes a cursor to the 'xs:complexType' element.
138138toComplexType :: Cursor -> XSDMonad ComplexType
139139toComplexType cursor = do
140140 let sequenceAxis = laxElement "sequence"