;; (in-package "XML") (defParameter *channel-dom* nil) (defParameter *email-dom* nil) (defparameter *xml-dom* nil) (defparameter *html-dom* nil) ;for 0.908 (export 'xqdm::write-node-graph "XQDM") (setf *channel-dom* (document-parser #P"xml:Tests;xml;channel.xml")) (write-node-graph (find-def-type '||::|Channel| *channel-dom*) "channel.dot") (write-node-graph *channel-dom* "channelD.dot") (setf *email-dom* (document-parser #P"xml:Tests;xml;email.xml")) (write-node-graph (find-def-type '||::|Email| *email-dom*) "email.dot") (write-node-graph *email-dom* "emailD.dot") (setf *xml-dom* (document-parser #P"www:Dokumente:Standards:XML:REC-xml-20001006.xml")) ;;(setf *xml-dom* (document-parser "http://www.w3.org/TR/2000/REC-xml-20001006.xml")) (write-node-graph (find-def-type '||::|spec| *xml-dom*) "xmlSpec.dot") (setf *html-dom* (document-parser #P"www:dokumente:standards:xml:XHTML1+DTD:REC-xhtml1-20000126.html")) (write-node-graph (find-def-type '|http://www.w3.org/1999/xhtml|::|html| *html-dom*) "xhtmlHtml.dot") (let ((count 0) (content-count 0) (content-max 0) (content-min 100)) (maphash #'(lambda (key def &aux cc) (declare (ignore key)) (incf count) (setf cc (length (collect-model-names (first (bnfp::bnf-rhs (model def)))))) (setf content-max (max content-max cc)) (setf content-min (min content-min cc)) (incf content-count cc)) (types *html-dom*)) (list :count count :average (float (/ content-count count)) :min content-min :max content-max)) (inspect *) :EOF