From: Jason Stephenson Date: Thu, 26 Jun 2014 23:19:59 +0000 (-0400) Subject: Update a commented code section regarding DTD/Schema validation. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b86e001a1a0e3a0a719230267e4207f53c20fe62;p=working%2FNCIPServer.git Update a commented code section regarding DTD/Schema validation. NCIP version 2+ only has a schema. NCIP version 1 has a DTD or a schema. To make the code comment relevant to NCIP version 2, which we implement here, I change the sample code to validate with a schema. Signed-off-by: Jason Stephenson --- diff --git a/lib/NCIP.pm b/lib/NCIP.pm index 364f063..8bc10b5 100644 --- a/lib/NCIP.pm +++ b/lib/NCIP.pm @@ -125,9 +125,9 @@ sub validate { return; }; - # we could validate against the dtd here, might be good? - # my $dtd = XML::LibXML::Dtd->parse_string($dtd_str); - # $dom->validate($dtd); + # we could validate against the schema here, might be good? + # my $schema = XML::LibXML::Schema->new(string => $schema_str); + # eval { $schema->validate($dom); } # perhaps we could check the ncip version and validate that too return 1; }