From b86e001a1a0e3a0a719230267e4207f53c20fe62 Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 26 Jun 2014 19:19:59 -0400 Subject: [PATCH] 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 --- lib/NCIP.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.43.2