<arg><option>-r</option></arg>
<arg><option>-t</option></arg>
+ <arg><option>-N</option></arg>
<arg><option>-v</option></arg>
representations of the input files.
By default, <option>-d</option> outputs a canonical representation
(described below).
- You can select different output formats using <option>-c</option>
- and <option>-m</option>.
+ You can select different output formats using <option>-c</option>,
+ <option>-m</option> and <option>-N</option>.
</para>
<para>
The output filenames will
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>-N</option></term>
+ <listitem>
+ <para>
+ Adds a doctype and notation declarations to canonical XML output.
+ This matches the example output used by the formal XML test cases.
+ Requires <option>-d</option> to specify an output file.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>-p</option></term>
<listitem>
RunXmlwfWF() {
file="$1"
reldir="$2"
- $XMLWF -p -d "$OUTPUT$reldir" "$file" > outfile || return $?
+ $XMLWF -p -N -d "$OUTPUT$reldir" "$file" > outfile || return $?
read outdata < outfile
if test "$outdata" = "" ; then
if [ -f "out/$file" ] ; then
return;
}
}
+ else {
+ entry->publicId = NULL;
+ }
entry->next = notationListHead;
notationListHead = entry;
usage(const XML_Char *prog, int rc)
{
ftprintf(stderr,
- T("usage: %s [-s] [-n] [-p] [-x] [-e encoding] [-w] [-d output-dir] [-c] [-m] [-r] [-t] [file ...]\n"), prog);
+ T("usage: %s [-s] [-n] [-p] [-x] [-e encoding] [-w] [-d output-dir] [-c] [-m] [-r] [-t] [-N] [file ...]\n"), prog);
exit(rc);
}
int outputType = 0;
int useNamespaces = 0;
int requireStandalone = 0;
+ int requiresNotations = 0;
enum XML_ParamEntityParsing paramEntityParsing =
XML_PARAM_ENTITY_PARSING_NEVER;
int useStdin = 0;
outputType = 't';
j++;
break;
+ case T('N'):
+ requiresNotations = 1;
+ j++;
+ break;
case T('d'):
if (argv[i][j + 1] == T('\0')) {
if (++i == argc)
XML_SetCharacterDataHandler(parser, characterData);
#ifndef W3C14N
XML_SetProcessingInstructionHandler(parser, processingInstruction);
- XML_SetDoctypeDeclHandler(parser, startDoctypeDecl, endDoctypeDecl);
- XML_SetNotationDeclHandler(parser, notationDecl);
+ if (requiresNotations) {
+ XML_SetDoctypeDeclHandler(parser, startDoctypeDecl, endDoctypeDecl);
+ XML_SetNotationDeclHandler(parser, notationDecl);
+ }
#endif /* not W3C14N */
break;
}