List Info

Thread: Progress in StaticDTD




Progress in StaticDTD
country flaguser name
United States
2007-07-18 17:01:13
Hello,

in StaticDTD we are moving to complete statical validness
against a DTD.

For a (compile time) function that uses our generic
combinators, we can
garuantee the following:

- The content model for each element is enforced (this is
done by checking
  a type-level determined finite automaton for each content
model)

- The attributes are validated (not so their values yet).
The check function
  facilitates a type-level mergesort algorithm.

We are using a HList like structure and so these garuantees
also hold with
higher order functions.

The implementation can be found at

http://m13
s07.vlinux.de/darcs/StaticDTD/v2

It is a mess and all of the infrastructure around it is
still missing, but
it shows that the concept might work.

We hope to have a well-working release in very few months.

Some words about related work:

 - WASH/HTML [1] was the original inspiration for us. It
checks proper
nesting of
   elements, but not the content model. It is a HTML, not a
'all DTDs of
XML'
   library

 - HaXml [2] has two modes: one with generic combinators,
which are not
type-safe
   in respect to a DTD, and one where validity is enforced
by regex-like
   Haskell abstract data types. With them, pattern matching
can be used.

 - HSXML [3] has generic combinators and checkes for some
nesting-properties.

 - BinaryNumbers.hs [4] is a great type-level implemention
of numeric
calculation
   and we are using it in our library for defining complete
order and
enumerate
   the states of a DFA.


As a side-effect of our work we hope to put the type-level
functions in a
small seperate 'type-level programming' library, for common
use.


Comments are very welcome.


Marcel Manthe

[1] http://www.informatik.uni-freiburg.de/~thiemann/WA
SH/#washhtml
[2] http://www.cs.york
.ac.uk/fp/HaXml/
[3] http:
//okmij.org/ftp/Scheme/xml.html#typed-SXML
[4] http://okmij.org/ftp/Haskell/types.html#binary-arithm
-- 
View this message in context: http://www.nabble.com/Progress-in-StaticDTD-
tf4106801.html#a11678520
Sent from the Haskell - Haskell mailing list archive at
Nabble.com.

_______________________________________________
Haskell mailing list
Haskellhaskell.org
http:
//www.haskell.org/mailman/listinfo/haskell

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )