ncbi / DtdAnalyzer

Other
34 stars 11 forks source link

Implement other ways of specifying possible root elements #18

Closed Klortho closed 11 years ago

Klortho commented 12 years ago

In the initial description of #2, I had in mind that there could be two other ways of specifying the list of root elements. Neither of these is implemented yet, though, and I want to close that ticket, so I'm creating this "maybe/someday" ticket to keep track of the idea.

  1. The program could also take the "list" of root elements from the dummy xml document -- just one root in this case, obviously. Not sure how useful this would be, but it would be very easy. That root element is specified in the doctype declaration, and is passed in as 'name' to the [startDTD parser event handler](http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html#startDTD%28java.lang.String, java.lang.String, java.lang.String%29), which in DTDEventHandler.java.
  2. As the tag "root", as described in the paper here. This might be better than a command-line option, because then the set of roots is specified in the DTD source files themselves, which, some would argue, is where they belong. And then you don't have to remember, for each DTD, what they are, and (assuming you omit the command-line argument) you'll get the same results every time you run it.
Klortho commented 11 years ago

2 is done. #1 is not very useful, I think, given that you can specify a set of roots on the command-line