hxt-relaxng-9.1.5.5: The HXT RelaxNG validator

Safe HaskellNone
LanguageHaskell98

Text.XML.HXT.RelaxNG.PatternToString

Synopsis

Documentation

patternToStringTree :: LA Pattern String Source

Returns a tree representation of the pattern structure. The hard work is done by formatTree.

Example:

+---element {}bar
    |
    +---group
        |
        +---oneOrMore
        |   |
        |   +---attribute AnyName
        |       |
        |       +---text
        |
        +---text

The function can be used to display circular ref-pattern structures.

Example:

<define name="baz">
  <element name="baz">
    ... <ref name="baz"/> ...
  </element>
</define>

patternToFormatedString :: SLA [NameClass] Pattern String Source

Returns a formated string representation of the pattern structure.

Example:

Element {}foo (Choice (Choice ( Value = abc,
datatypelibrary = http://relaxng.org/ns/structure/1.0, type = token,
context (base-uri =file://test.rng,
parameter: xml = http://www.w3.org/XML/1998/namespaces, foo = www.bar.baz),

The function can be used to display circular ref-pattern structures.

xmlTreeToPatternStringTree :: LA XmlTree String Source

Returns a tree representation of the pattern structure. (see also: createPatternFromXmlTree and patternToStringTree)

xmlTreeToPatternFormatedString :: LA XmlTree String Source

Returns a formated string representation of the pattern structure. (see also: createPatternFromXmlTree and patternToFormatedString)

xmlTreeToPatternString :: LA XmlTree String Source

Returns a string representation of the pattern structure. (see also: createPatternFromXmlTree)

Example:

Element {}foo (Choice (Choice (Value ("","token") "abc"
("foo","www.bar.baz")]))(Data ("http://www.mysql.com","VARCHAR")
[("length","2"),("maxLength","5")])) (Element {}bar (Group (Element {}baz

The function can not be used to display circular ref-pattern structures.

nameClassToString :: NameClass -> String Source

Returns a string representation of a nameclass.