You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Steve Traut (JIRA)" <xm...@xml.apache.org> on 2005/03/17 19:26:23 UTC
[jira] Created: (XMLBEANS-130) Command-line tools aren't consistent in printing doc for -usage option.
Command-line tools aren't consistent in printing doc for -usage option.
-----------------------------------------------------------------------
Key: XMLBEANS-130
URL: http://issues.apache.org/jira/browse/XMLBEANS-130
Project: XMLBeans
Type: Bug
Versions: Version 2 Beta 1
Reporter: Steve Traut
Priority: Minor
The tools in the bin dir do a variety of things when asked for help. Some print help with no args, others print help with -usage, some do nothing, some choke on -usage, etc. Below I've listed the tools whose Java source could be updated with a printUsage() method (or whose printUsage method could be improved), along with source code to paste into the method. In some cases, support for a -usage option will needed to be added. See other comments for each.
Note that I've left alone those tools whose errors are merely formatting (ie, no capitalization where needed).
// dumpxsb (org.apache.xmlbeans.impl.tool.XsbDumper)
// This tool currently prints no help, and using -usage prints a "cannot find the file"
// message.
System.out.println("Prints the contents of an XSB file in human-readable form. An\n" +
"XSB file contains schema meta information needed to perform tasks \n" +
"such as binding and validation.\n");
System.out.println("Usage: dumpxsb myfile.xsb");
System.out.println(" myfile.xsb - Path to an XSB file.");
System.out.println();
// scopy (org.apache.xmlbeans.impl.tool.SchemaCopy)
// Usage remark in main method should be update to show "scopy" instead of "schemacopy"
// in syntax. Also, the -usage option prints a "badly formed URL" message.
// In other words, use the following instead of what's there and hook up -usage.
System.out.println("Copies the XML schema at the specified URL to the specified file.\n");
System.out.println("Usage: scopy sourceurl [targetfile]");
System.out.println(" sourceurl - The URL at which the schema is located.");
System.out.println(" targetfile - The file to which the schema should be copied.");
System.out.println();
// sfactor (org.apache.xmlbeans.impl.tool.FactorImports)
// The tool currently prints help when no args are specified, but the "-usage" option should be hooked in
// to make it consistent with other tools. Also, the following should replace the text
// that's currently in the source (which is poorly written).
// Also, note that the UNIX version of sfactor doesn't seem to run on UNIX. Looks
// like it suffers from the line ending problem that comes from getting saved on a
// Windows OS.
System.out.println("Refactors a directory of XSD files to remove name conflicts.\n");
System.out.println("Usage: sfactor [-import common.xsd] [-out outputdir] inputdir");
System.out.println(" -import common.xsd - The XSD file to contain redundant definitions for importing.");
System.out.println(" -out outputdir - The directory into which to place XSD files\n" +
" resulting from refactoring, plus a commonly imported common.xsd.");
System.out.println(" inputdir - The directory containing the XSD files with redundant definitions.");
System.out.println(" -license - Print license information.");
System.out.println();
// svalidate (org.apache.xmlbeans.impl.tool.StreamInstanceValidator)
// Replace "switches" with "options" and fix spelling errors and formatting inconsistency.
// As with sfactor, the UNIX version of svalidate doesn't seem to run on UNIX. Is
// this the Windows line ending problem?
System.out.println("Validates the specified instance against the specified schema. \n" +
"A streaming validation useful for validating very large instance documents \n" +
"with less memory. Contrast with the validate tool.\n");
System.out.println("Usage: svalidate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
System.out.println(" -dl - Enable network downloads for imports and includes.");
System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
System.out.println(" -noupa - Disable unique particle attribution rule.");
System.out.println(" -license - Print license information.");
System.out.println();
// validate (org.apache.xmlbeans.impl.tool.InstanceValidator)
System.out.println("Validates the specified instance against the specified schema. \n" +
"Contrast with the svalidate tool, which validates using a stream.\n");
System.out.println("Usage: validate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
System.out.println(" -dl - Enable network downloads for imports and includes.");
System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
System.out.println(" -noupa - Disable unique particle attribution rule.");
System.out.println(" -license - Print license information.");
System.out.println();
// xsdtree (org.apache.xmlbeans.impl.tool.TypeHierarchyPrinter)
// noargs and -usage both print syntax but no descriptions.
System.out.println("Prints the inheritance hierarchy of types defined in a schema.\n");
System.out.println("Usage: xsdtree [-noanon] [-nopvr] [-noupa] [-partial] [-license] schemafile.xsd*");
System.out.println(" -noanon - Don't include anonymous types in the tree.");
System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
System.out.println(" -noupa - Disable unique particle attribution rule.");
System.out.println(" -partial - Print only part of the hierarchy.");
System.out.println(" -license - Print license information.");
System.out.println(" schemafile.xsd - File containing the schema for which to print a tree.");
System.out.println();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Resolved: (XMLBEANS-130) Command-line tools aren't consistent in printing doc for -usage option.
Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XMLBEANS-130?page=history ]
Jacob Danner resolved XMLBEANS-130:
-----------------------------------
Assign To: Radu Preotiuc-Pietro (was: Jacob Danner)
Resolution: Fixed
Fix Version: Version 2 Beta 1
Version 2 Beta 2
Version 2
The usage text has been updated with revision 158637. Radu can you take a look at the sfactor and svalidate commands on UNIX?
> Command-line tools aren't consistent in printing doc for -usage option.
> -----------------------------------------------------------------------
>
> Key: XMLBEANS-130
> URL: http://issues.apache.org/jira/browse/XMLBEANS-130
> Project: XMLBeans
> Type: Bug
> Versions: Version 2 Beta 1
> Reporter: Steve Traut
> Assignee: Radu Preotiuc-Pietro
> Priority: Minor
> Fix For: Version 2, Version 2 Beta 1, Version 2 Beta 2
>
> The tools in the bin dir do a variety of things when asked for help. Some print help with no args, others print help with -usage, some do nothing, some choke on -usage, etc. Below I've listed the tools whose Java source could be updated with a printUsage() method (or whose printUsage method could be improved), along with source code to paste into the method. In some cases, support for a -usage option will needed to be added. See other comments for each.
> Note that I've left alone those tools whose errors are merely formatting (ie, no capitalization where needed).
> // dumpxsb (org.apache.xmlbeans.impl.tool.XsbDumper)
> // This tool currently prints no help, and using -usage prints a "cannot find the file"
> // message.
> System.out.println("Prints the contents of an XSB file in human-readable form. An\n" +
> "XSB file contains schema meta information needed to perform tasks \n" +
> "such as binding and validation.\n");
> System.out.println("Usage: dumpxsb myfile.xsb");
> System.out.println(" myfile.xsb - Path to an XSB file.");
> System.out.println();
> // scopy (org.apache.xmlbeans.impl.tool.SchemaCopy)
> // Usage remark in main method should be update to show "scopy" instead of "schemacopy"
> // in syntax. Also, the -usage option prints a "badly formed URL" message.
> // In other words, use the following instead of what's there and hook up -usage.
> System.out.println("Copies the XML schema at the specified URL to the specified file.\n");
> System.out.println("Usage: scopy sourceurl [targetfile]");
> System.out.println(" sourceurl - The URL at which the schema is located.");
> System.out.println(" targetfile - The file to which the schema should be copied.");
> System.out.println();
> // sfactor (org.apache.xmlbeans.impl.tool.FactorImports)
> // The tool currently prints help when no args are specified, but the "-usage" option should be hooked in
> // to make it consistent with other tools. Also, the following should replace the text
> // that's currently in the source (which is poorly written).
> // Also, note that the UNIX version of sfactor doesn't seem to run on UNIX. Looks
> // like it suffers from the line ending problem that comes from getting saved on a
> // Windows OS.
> System.out.println("Refactors a directory of XSD files to remove name conflicts.\n");
> System.out.println("Usage: sfactor [-import common.xsd] [-out outputdir] inputdir");
> System.out.println(" -import common.xsd - The XSD file to contain redundant definitions for importing.");
> System.out.println(" -out outputdir - The directory into which to place XSD files\n" +
> " resulting from refactoring, plus a commonly imported common.xsd.");
> System.out.println(" inputdir - The directory containing the XSD files with redundant definitions.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // svalidate (org.apache.xmlbeans.impl.tool.StreamInstanceValidator)
> // Replace "switches" with "options" and fix spelling errors and formatting inconsistency.
> // As with sfactor, the UNIX version of svalidate doesn't seem to run on UNIX. Is
> // this the Windows line ending problem?
> System.out.println("Validates the specified instance against the specified schema. \n" +
> "A streaming validation useful for validating very large instance documents \n" +
> "with less memory. Contrast with the validate tool.\n");
> System.out.println("Usage: svalidate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
> System.out.println(" -dl - Enable network downloads for imports and includes.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // validate (org.apache.xmlbeans.impl.tool.InstanceValidator)
> System.out.println("Validates the specified instance against the specified schema. \n" +
> "Contrast with the svalidate tool, which validates using a stream.\n");
> System.out.println("Usage: validate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
> System.out.println(" -dl - Enable network downloads for imports and includes.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // xsdtree (org.apache.xmlbeans.impl.tool.TypeHierarchyPrinter)
> // noargs and -usage both print syntax but no descriptions.
> System.out.println("Prints the inheritance hierarchy of types defined in a schema.\n");
> System.out.println("Usage: xsdtree [-noanon] [-nopvr] [-noupa] [-partial] [-license] schemafile.xsd*");
> System.out.println(" -noanon - Don't include anonymous types in the tree.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -partial - Print only part of the hierarchy.");
> System.out.println(" -license - Print license information.");
> System.out.println(" schemafile.xsd - File containing the schema for which to print a tree.");
> System.out.println();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[jira] Closed: (XMLBEANS-130) Command-line tools aren't consistent in printing doc for -usage option.
Posted by "Jacob Danner (JIRA)" <xm...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XMLBEANS-130?page=all ]
Jacob Danner closed XMLBEANS-130:
---------------------------------
Assign To: (was: Radu Preotiuc-Pietro)
Closing
> Command-line tools aren't consistent in printing doc for -usage option.
> -----------------------------------------------------------------------
>
> Key: XMLBEANS-130
> URL: http://issues.apache.org/jira/browse/XMLBEANS-130
> Project: XMLBeans
> Type: Bug
> Versions: Version 2 Beta 1
> Reporter: Steve Traut
> Priority: Minor
> Fix For: Version 2, Version 2 Beta 1, Version 2 Beta 2
>
> The tools in the bin dir do a variety of things when asked for help. Some print help with no args, others print help with -usage, some do nothing, some choke on -usage, etc. Below I've listed the tools whose Java source could be updated with a printUsage() method (or whose printUsage method could be improved), along with source code to paste into the method. In some cases, support for a -usage option will needed to be added. See other comments for each.
> Note that I've left alone those tools whose errors are merely formatting (ie, no capitalization where needed).
> // dumpxsb (org.apache.xmlbeans.impl.tool.XsbDumper)
> // This tool currently prints no help, and using -usage prints a "cannot find the file"
> // message.
> System.out.println("Prints the contents of an XSB file in human-readable form. An\n" +
> "XSB file contains schema meta information needed to perform tasks \n" +
> "such as binding and validation.\n");
> System.out.println("Usage: dumpxsb myfile.xsb");
> System.out.println(" myfile.xsb - Path to an XSB file.");
> System.out.println();
> // scopy (org.apache.xmlbeans.impl.tool.SchemaCopy)
> // Usage remark in main method should be update to show "scopy" instead of "schemacopy"
> // in syntax. Also, the -usage option prints a "badly formed URL" message.
> // In other words, use the following instead of what's there and hook up -usage.
> System.out.println("Copies the XML schema at the specified URL to the specified file.\n");
> System.out.println("Usage: scopy sourceurl [targetfile]");
> System.out.println(" sourceurl - The URL at which the schema is located.");
> System.out.println(" targetfile - The file to which the schema should be copied.");
> System.out.println();
> // sfactor (org.apache.xmlbeans.impl.tool.FactorImports)
> // The tool currently prints help when no args are specified, but the "-usage" option should be hooked in
> // to make it consistent with other tools. Also, the following should replace the text
> // that's currently in the source (which is poorly written).
> // Also, note that the UNIX version of sfactor doesn't seem to run on UNIX. Looks
> // like it suffers from the line ending problem that comes from getting saved on a
> // Windows OS.
> System.out.println("Refactors a directory of XSD files to remove name conflicts.\n");
> System.out.println("Usage: sfactor [-import common.xsd] [-out outputdir] inputdir");
> System.out.println(" -import common.xsd - The XSD file to contain redundant definitions for importing.");
> System.out.println(" -out outputdir - The directory into which to place XSD files\n" +
> " resulting from refactoring, plus a commonly imported common.xsd.");
> System.out.println(" inputdir - The directory containing the XSD files with redundant definitions.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // svalidate (org.apache.xmlbeans.impl.tool.StreamInstanceValidator)
> // Replace "switches" with "options" and fix spelling errors and formatting inconsistency.
> // As with sfactor, the UNIX version of svalidate doesn't seem to run on UNIX. Is
> // this the Windows line ending problem?
> System.out.println("Validates the specified instance against the specified schema. \n" +
> "A streaming validation useful for validating very large instance documents \n" +
> "with less memory. Contrast with the validate tool.\n");
> System.out.println("Usage: svalidate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
> System.out.println(" -dl - Enable network downloads for imports and includes.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // validate (org.apache.xmlbeans.impl.tool.InstanceValidator)
> System.out.println("Validates the specified instance against the specified schema. \n" +
> "Contrast with the svalidate tool, which validates using a stream.\n");
> System.out.println("Usage: validate [-dl] [-nopvr] [-noupa] [-license] schema.xsd instance.xml");
> System.out.println(" -dl - Enable network downloads for imports and includes.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -license - Print license information.");
> System.out.println();
> // xsdtree (org.apache.xmlbeans.impl.tool.TypeHierarchyPrinter)
> // noargs and -usage both print syntax but no descriptions.
> System.out.println("Prints the inheritance hierarchy of types defined in a schema.\n");
> System.out.println("Usage: xsdtree [-noanon] [-nopvr] [-noupa] [-partial] [-license] schemafile.xsd*");
> System.out.println(" -noanon - Don't include anonymous types in the tree.");
> System.out.println(" -nopvr - Disable particle valid (restriction) rule.");
> System.out.println(" -noupa - Disable unique particle attribution rule.");
> System.out.println(" -partial - Print only part of the hierarchy.");
> System.out.println(" -license - Print license information.");
> System.out.println(" schemafile.xsd - File containing the schema for which to print a tree.");
> System.out.println();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org