@@ -82,8 +82,10 @@ toElem cursor = do
8282 name <- attrThrowXsd "name" el
8383 $ "Expected attribute 'name' for element: " <> show (node cursor)
8484 let
85− minOc = maybe 0 (read . T.unpack) (M.lookup "minOccurs" attrs)
86− maxOc = read . T.unpack <$> M.lookup "maxOccurs" attrs
85+ -- https://www.w3.org/TR/xmlschema-1/#cElement_Declarations
86+ -- https://www.w3.org/TR/xmlschema-1/#declare-element
87+ minOc = maybe 1 (read . T.unpack) (M.lookup "minOccurs" attrs)
88+ maxOc = maybe 1 (read . T.unpack) (M.lookup "maxOccurs" attrs)
8789 datatypeRef <- case mAttrType of
8890 Just dtn -> pure $ DatatypeRef dtn
8991 Nothing -> do