Page 1 of 1

Script image creation of schema elements

Posted: Thu Aug 18, 2011 9:57 pm
by jonpstatemn
Is there a way to use a list of xpath expressions to dynamically create images. It is nice to be able to save the elements using the design view, but if you want to update 25 images it becomes very tedious and error prone.

Thank you for your help.

Re: Script image creation of schema elements

Posted: Fri Aug 19, 2011 12:08 pm
by adrian
Hello,

Currently(v12.2) you cannot use such a list of XPath expressions to dynamically create images of elements.

However, you could use the Schema Documentation generation(Tools -> Generate Documentation -> Schema Documentation) to generate the documentation and images for all the elements from the schema.

If you generate HTML documentation, you will find the generated images in the "img" directory from the output directory.
You can change the generated image type(JPEG, PNG, GIF, SVG) in the Settings tab.

This tool can also be used from the command line(optionally you can use the settings file exported from the GUI tool):
Windows - schemaDocumentation.bat
Linux/Mac - schemaDocumentation.sh

Regards,
Adrian

Re: Script image creation of schema elements

Posted: Fri Aug 19, 2011 4:42 pm
by jonpstatemn
Is this a feature that can be added to 12.3? Also can you add a feature that allows you to import a previously exported settings file like you can with generate xml instances.

How do I tell the commandline to use a specific settings file?

Thank you for your help.

OxygenXML is an excellent product.

Re: Script image creation of schema elements

Posted: Fri Aug 19, 2011 5:37 pm
by adrian
Hi,

I've logged your request to our issue tracking tool. It will be analyzed and if found appropriate it will be implemented in a future version of Oxygen. I'm afraid this can't possibly be implemented in the next version of Oxygen, maybe later.

Loading the exported settings from the schema documentation dialog has already been implemented and it will be available in v13(coming soon).


Running the command line startup scripts with no arguments will give you the usage:

Code: Select all

schemaDocumentation schemaFile [ [-cfg:configFile] | [[-out:outputFile] [-format:<value>] [-xsl:xslFile] [-split:<value>] [-openInBrowser:<value>]] |
[--help | -help | --h | -h]

Where:
schemaFile = the XML Schema file
-cfg:configfile = the configuration file. It contains the output file, split method, output format options
and some advanced options regarding the included components and components details.
If an external configuration file is specified all other supplied arguments except the XML Schema file will be ignored.
You can create such a file in the Oxygen "Schema Documentation" dialog. See the Oxygen user manual for additional information on how to create one.

-out:outputFile = the file where the generated documentation will be saved.
By default it is the name of the schema file with 'html' extension.
-format:<value> = the output format type used when generating the documentation.
value = [html | pdf | docbook | custom]
html = generate documentation in HTML format.
pdf = generate documentation in PDF format.
docbook = generate documentation in DocBook format.
custom = generate documentation in a custom format.

-xsl:<xslFile> = the XSL file to be applied on the intermediate xml format.
If there is no xsl file provided then the result will be in the HTML format.
-split:<value> = the split method used when generating the documentation. Splitting is recommended for large schemas
value = [none | namespace | | component | location].
none = generate one single output file.
namespace = generate an output file for every namespace in the schema.
component = generate an output file for every component in the schema.
location = generate an output file for every schema location.
By default the used method is 'none'
-openInBrowser:<value> = open the result of the transformation in browser.
value = [true | false].
true = open the resulted file in browser.
false = do not open the resulted file in browser.
By default the value is false.

--help | -help | --h | -h = show this help.

Example: schemaDocumentation example.xsd -out:schemaDocumentation.html -format:custom -xsl:example.xsl -split:namespace
So, to use the exported settings/configuration file you have to run:
schemaDocumentation -cfg:<configfile>

Regards,
Adrian

Re: Script image creation of schema elements

Posted: Fri Aug 19, 2011 6:09 pm
by jonpstatemn
Thank you appears to work great. Last question. How can I run/launch the script from within OxygenXml?

Re: Script image creation of schema elements

Posted: Fri Aug 19, 2011 7:35 pm
by jonpstatemn
Nevermind I figured it out. Everything works perfectly.

Thank you again for your help.