.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SCHEMA2EXAMPLE 1p" .TH SCHEMA2EXAMPLE 1p "2022-11-27" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" schema2example \- convert XML schema knowledge into Perl or XML examples .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& schema2example xml\-file schema\-file(s) >outfile \& \& schema2example \-x xml\-file \-s schema\-file(s) \-o outfile .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1XML\s0 schemas are quite hard to read, certainly when multiple name-spaces are involved. The \fBtemplate()\fR function in XML::Compile::Schema function can help displaying the expected structure of a message; this module is a wrapper around that function. .SS "Options" .IX Subsection "Options" You can either specify an \s-1XML\s0 message filename and one or more schema filenames as arguments, or use the options. .IP "\-\-xml|\-x filename" 4 .IX Item "--xml|-x filename" The file which contains the xml message. A single dash means \*(L"stdin\*(R". .IP "\-\-schema|\-s filename(s)" 4 .IX Item "--schema|-s filename(s)" This option can be repeated, or the filenames separated by comma's, if you have more than one schema file to parse. All imported and included schema components have to be provided explicitly. .IP "\-\-type|\-t \s-1TYPE\s0" 4 .IX Item "--type|-t TYPE" The type of the root element, required if the \s-1XML\s0 is not namespaceo qualified, although the schema is. If not specified, the root element is automatically inspected. .Sp The \s-1TYPE\s0 notation is \f(CW\*(C`{namespace}localname\*(C'\fR. Be warned to use quoting on the \s-1UNIX\s0 command-line, because curly braces have a special meaning for the shell. .IP "\-\-output|\-o filename" 4 .IX Item "--output|-o filename" By default, the output is to stdout. .IP "\-\-show \s-1STRING\s0" 4 .IX Item "--show STRING" A comma separated list of comment components which should be included, by default \f(CW\*(C`ALL\*(C'\fR. An empty string or \f(CW\*(C`NONE\*(C'\fR will exclude all comments. The \s-1STRING\s0 can also be a comma separated combination of \f(CW\*(C`struct\*(C'\fR, \f(CW\*(C`type\*(C'\fR, \&\f(CW\*(C`occur\*(C'\fR, and \f(CW\*(C`facets\*(C'\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" This module is part of Perl's XML-Compile distribution. Website: \fIhttp://perl.overmeer.net/xml\-compile/\fR .SH "LICENSE" .IX Header "LICENSE" Copyrights 2008 by Mark Overmeer. For other contributors see ChangeLog. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See \fIhttp://www.perl.com/perl/misc/Artistic.html\fR