running the flattenSchemaMac.sh script

I have oXygen 14.2, and I am trying to run the script to flatten xsd files. When I try to run it I get the following error message: source /Applications/oxygen/flattenSchemaMac.sh -in:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/temp/local.xsd -outDir:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/xsd/xsd-normal dirname: illegal option -- b usage: dirname path basename: illegal option -- b usage: basename string [suffix] basename [-a] [-s suffix] string [...] Error: Could not find or load main class ro.sync.exml.editor.xsdeditor.pagetext.actions.FlatXmlSchema Any suggestions would be appreciated. Thanks, Tara

Hello, 'source' does not seem to be able to interpret some of the commands from the bash script. Please use 'sh' (or '/bin/sh') instead of 'source' as the instructions recommend. e.g. sh /Applications/oxygen/flattenSchemaMac.sh ... Regards, Adrian Adrian Buza oXygen XML Editor and Author Support Tel: +1-650-352-1250 ext.2020 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com On 05.06.2014 22:30, Tara Athan wrote:
I have oXygen 14.2, and I am trying to run the script to flatten xsd files. When I try to run it I get the following error message:
source /Applications/oxygen/flattenSchemaMac.sh -in:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/temp/local.xsd -outDir:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/xsd/xsd-normal
dirname: illegal option -- b usage: dirname path basename: illegal option -- b usage: basename string [suffix] basename [-a] [-s suffix] string [...] Error: Could not find or load main class ro.sync.exml.editor.xsdeditor.pagetext.actions.FlatXmlSchema
Any suggestions would be appreciated.
Thanks, Tara _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

On 6/6/14 3:22 AM, Oxygen XML Editor Support (Adrian Buza) wrote:
Hello,
'source' does not seem to be able to interpret some of the commands from the bash script. Please use 'sh' (or '/bin/sh') instead of 'source' as the instructions I am unable to locate such instructions. Could you please give a link? Thanks so much for your help. - Tara
recommend. e.g. sh /Applications/oxygen/flattenSchemaMac.sh ...
Regards, Adrian
Adrian Buza oXygen XML Editor and Author Support
Tel: +1-650-352-1250 ext.2020 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com
On 05.06.2014 22:30, Tara Athan wrote:
I have oXygen 14.2, and I am trying to run the script to flatten xsd files. When I try to run it I get the following error message:
source /Applications/oxygen/flattenSchemaMac.sh -in:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/temp/local.xsd -outDir:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/xsd/xsd-normal
dirname: illegal option -- b usage: dirname path basename: illegal option -- b usage: basename string [suffix] basename [-a] [-s suffix] string [...] Error: Could not find or load main class ro.sync.exml.editor.xsdeditor.pagetext.actions.FlatXmlSchema
Any suggestions would be appreciated.
Thanks, Tara _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hi Tara, Actually, the instructions I mentioned are not in the manual. They are the instructions shown in the command line when you try to launch the script with no arguments. You would have to be able to run the script to see the instructions, so I see how that kind of defeats the purpose when you don't know how to run it in the first place... However, even running it with source gives the appropriate instructions (first two lines are script errors reported by 'source'): $ source flattenSchema.sh
dirname: invalid option -- 'b' Try `dirname --help' for more information. The command line should contain at least 2 parameters: the input schema URL and the output directory.
sh flattenSchema.sh [-in:inputSchemaURL -outDir:outputDirectory [-flattenImports:<boolean_value>] | [-useCatalogs:<boolean_value>] [-flattenCatalogResolvedImports:<boolean_value>] [-verbose]] | [--help | -help | --h | -h]
Where: -in:inputSchemaURL = The input schema URL -outDir:outputDirectory = The directory where the flattened schemas should be saved -flattenImports:<boolean_value> = Controls if the imported XML Schemas should be flattened or not. The default value 'true'. -useCatalogs:<boolean_value> = Controls if the references to other XML Schemas should be resolved through the available XML Catalogs. The default value 'false'. -flattenCatalogResolvedImports:<boolean_value> = Controls if the imported schemas that were resolved through the XML Catalogs should be flattened or not. This option is used only when '-useCatalogs' is set to 'true'. The default value is 'true'. -verbose = Provides information about the current flatten XML Schema operation. --help | -help | --h | -h = Shows this help.
Example: sh flattenSchema.sh -in:http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd -outDir:mySchemas/flattened/xhtml -flattenImports:true -useCatalogs:true -flattenCatalogResolvedImports:true -verbose
The manual mentions only which are the flatten schema scripts, but not how to run them: http://www.oxygenxml.com/doc/ug-editor/index.html#topics/xml-schema-flat.htm... I've submitted an adjustment to our documentation department. Regards, Adrian On 07.06.2014 15:37, Tara Athan wrote:
On 6/6/14 3:22 AM, Oxygen XML Editor Support (Adrian Buza) wrote:
Hello,
'source' does not seem to be able to interpret some of the commands from the bash script. Please use 'sh' (or '/bin/sh') instead of 'source' as the instructions I am unable to locate such instructions. Could you please give a link? Thanks so much for your help. - Tara
recommend. e.g. sh /Applications/oxygen/flattenSchemaMac.sh ...
Regards, Adrian
Adrian Buza oXygen XML Editor and Author Support
Tel: +1-650-352-1250 ext.2020 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com
On 05.06.2014 22:30, Tara Athan wrote:
I have oXygen 14.2, and I am trying to run the script to flatten xsd files. When I try to run it I get the following error message:
source /Applications/oxygen/flattenSchemaMac.sh -in:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/temp/local.xsd -outDir:/Users/taraathan/Repositories/LegalRuleMLSVN/legalruleml/trunk/schemas/xsd/xsd-normal
dirname: illegal option -- b usage: dirname path basename: illegal option -- b usage: basename string [suffix] basename [-a] [-s suffix] string [...] Error: Could not find or load main class ro.sync.exml.editor.xsdeditor.pagetext.actions.FlatXmlSchema
Any suggestions would be appreciated.
Thanks, Tara _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- Adrian Buza oXygen XML Editor and Author Support Tel: +1-650-352-1250 ext.2020 Fax: +40-251-461482 support@oxygenxml.com http://www.oxygenxml.com
participants (2)
-
Oxygen XML Editor Support (Adrian Buza)
-
Tara Athan