1 {-# LANGUAGE AllowAmbiguousTypes #-}
2 {-# LANGUAGE DeriveGeneric #-}
3 {-# LANGUAGE FlexibleContexts #-}
4 {-# LANGUAGE NoMonomorphismRestriction #-}
5 {-# LANGUAGE OverloadedStrings #-}
6 {-# LANGUAGE StrictData #-}
7 {-# LANGUAGE TypeApplications #-}
8 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
9 module RelaxNG.Whatever where
11 import Data.Function (($), (.))
12 import Data.Maybe (Maybe(..))
13 import Text.Show (Show)
14 import GHC.Generics (Generic)
15 import qualified Data.Text.Lazy as TL
17 import Symantic.XML as XML
18 import Symantic.XML.RelaxNG as RelaxNG
21 namespace Nothing xmlns_whatever <.>
22 namespace (Just "xsd") "http://www/w3/org/2001/XMLSchema-datatypes" <.>
25 xmlns_whatever :: Namespace
26 xmlns_whatever = "2020/whatever.rnc"
27 elem = element . QName xmlns_whatever
28 attr n = attribute (QName "" n) text
32 { whatever_a :: TL.Text
33 } deriving (Generic, Show)
38 namespace Nothing xmlns_whatever <.>
39 namespace (Just "whatever") xmlns_whatever <.>
42 namespace (Just "what") xmlns_whatever <.>
44 namespace Nothing xmlns_empty <.>