pa1b - validation related

3 views
Skip to first unread message

mohamed

unread,
Feb 16, 2012, 4:41:18 PM2/16/12
to cs639_s12
a) test3v to output Grid's XML with linkage to DTD, and validate it.

Does this mean this target is supposed to add <!DOCTYPE source SYSTEM
"JavaSource.dtd"> to the top of the produced xml?

b)
java -cp build\classes;input\classes cs639.presentation.JavaToXML -v
examples.sort.SortEx

According to the notes the above command is supposed to do the
validation. how?
I mean JavaToXML is the class I wrote which reads a class and
transforms it to an xml. It doesn't know any thing about validation
like Counter.java does and I don't see the participation of any other
library doing that validation.
If I am missing the obvious please point me to it.

Matthew Almeida

unread,
Feb 16, 2012, 4:54:40 PM2/16/12
to cs63...@googlegroups.com
The notes link really is a good guide to this, but to put it more plainly, I read the requirements like this:

-JavaToXML should put the DOCTYPE line in by default.
-Counter.class should be repackaged to make it visible to JavaToXML.
-when JavaToXML is called with arguments "-v" or "-v -s", it should create the XML, then
run Counter itself, using the appropriate arguments to test the file it has just created.
-this is possible against dtd if the DOCTYPE statement is in the XML by default.  To test against an xsd, remember that "-schema Whatever.xsd" is a valid set of arguments to pass to Counter for validation without having to have a specific header in the xml file.

Hope this helps,
Matt

mohamed

unread,
Feb 16, 2012, 6:18:39 PM2/16/12
to cs639_s12
You clarified well. Thanks.

On Feb 16, 4:54 pm, Matthew Almeida <mateo.alme...@gmail.com> wrote:
> The notes <http://www.cs.umb.edu/cs639/NotesPa1b.html> link really is a
> good guide to this, but to put it more plainly, I read the requirements
> like this:
>
> -JavaToXML should put the DOCTYPE line in by default.
> -Counter.class should be repackaged to make it visible to JavaToXML.
> -when JavaToXML is called with arguments "-v" or "-v -s", it should create
> the XML, then
> run Counter *itself*, using the appropriate arguments to test the file it
Reply all
Reply to author
Forward
0 new messages