Example of ExportOptions

Build 1501 on 14/Nov/2017  This topic last edited on: 15/May/2015, at 13:07

<?xml version="1.0" encoding="utf-8"?>

<!--

 Export options used by

   cmd4 export

   srv4 export

   ../do.ashx?cmd=feed

   LoadObjects workflow activity

 

 See http://tech.teradp.com/tech/html/gn4/docs/VSdoc/frlrfTeraDPGN4CommonXmlExportOptionsClassTopic.html for technical documentation

 AccessStrict

   'true' to make the export fail if any of the object attributes to be exported are not readable by the current user.

   If 'false' (the default) such attributes would not be exported and the export would fail only if ALL the attributes

   are not readable by the current user.

 

 DataAsId

   'true' to export binary data only as id

   'false' by default - exports binary data as a complete element with size, MIME type and either URL or inline data

 

 DataFiles

   True to extract as separate files the binary data that is not inserted directly in the XML.

   The corresponding URLs will point to the extracted file instead than back to the server.

   The files will be placed in the same directory of the output XML file.

   It does not apply when used in a workflow or a feed command

   'false' by default

 DataMaxSize

   Maximum size in bytes of the binary data to be inserted directly in the XML. Larger data is exported as

   URLs pointing back to the service or as separate files (see DataFiles above).

   If 0 all the data is exported as URL, if -1 all the data is inserted in the XML regardless of its size.

   Not used if DataAsId is true.

   Default value 100,000 bytes

 

 Zip

   'true' to create a single ZIP containing all the files (XML+data files) being exported.

   It doesn't apply to LoadObjects workflow activity

   Default: 'false'

 

 ZipCompressionLevel

   Zip compression level (0 - store only to 9 - means best compression)

   Used only when Zip is 'true' (see above), and it doesn't apply to LoadObjects workflow activity.

   Default: 9  

 

 Encoding

   Character encoding of the output, it can be one of the encoding names listed at http://msdn.microsoft.com/en-us/library/system.text.encoding.getencodings.aspx#Y489

   or one of those special values:

     UTF-8-NOBOM       UTF-8 without the initial byte order mark

     UTF-16BE          Big-endian UTF-16 (high-order byte first)

     UTF-16LE          Little-endian UTF-16 (low-order byte first)

     UTF-16BE-NOBOM    Big-endian UTF-16 without the initial byte order mark

     UTF-16LE-NOBOM    Little-endian UTF-16 without the initial byte order mark

     UTF-32BE          Big-endian UTF-32

     UTF-32LE          Little-endian UTF-32

     UTF-32BE-NOBOM    Big-endian UTF-32 without the initial byte order mark

     UTF-32LE-NOBOM    Little-endian UTF-32 without the initial byte order mark

   Encoding names are case-insensitive.

   Meaningless when used in a workflow activity: the output is an in-memory XML and not a file with an encoding.

   Default value 'UTF-8'.

 

 Indent

   Indentation of the XML output, possible values are:

     No              No indentation

     Tab             Indentation using a tab

     TabAttr         Indentation using a tab and indenting also the attributes

     TwoSpaces       Indentation using two spaces

     TwoSpacesAttr   Indentation using two spaces and indenting also the attributes

     FourSpaces      Indentation using four spaces

     FourSpacesAttr  Indentation using four spaces and indenting also the attributes

   Meaningless when used in a workflow activity: the output is an in-memory XML, not a string or file with indentation.

   Default value 'No'

 

 NewLine

   New line characters to use, possible values are:

     CR    Single CR (code 13 - Mac)

     CRLF  CR+LF pair (Windows) - the default

     LF    Single LF (code 10 - Unix)

   Meaningless when used in a workflow activity: the output is an in-memory XML, not a string or file with multiple lines.

   Used only when Indentation is different than 'No'

   Default 'CRLF'

 

 OmitXmlDeclaration

   'true' to omit the inital XML declaration in the output

   Meaningless when used in a workflow activity: the output is an in-memory XML, not a string or file with an XML declaration.

   Default: 'false'

 

 MimeType

   MIME type of the produced output.

   Used only by the do.ashx?cmd=feed command.

   Useful when generating special XML formats (like RSS) that have their own MIME type

   No default value. If not specified do.ashx?cmd=feed uses 'application/xml'.

 

 MaxDepth

   Maximum depth of the XML representation of the objects being exported.

   It is used when generating a feed or by the LoadObjects command, not when exporting stand-alone objects.

   -1 = no limits (dangerous), 0 = generate stand-alone object XML, without navigation of the referenced objects.

   It is ignored if the options specify an XSL transformation to apply to the XML

   Default value 3

 

 NavOptions

   Options controlling which extra information go in the XML.

   It is used when generating a feed or by the LoadObjects command, not when exporting stand-alone objects.

   See http://tech.teradp.com/tech/html/gn4/docs/VSdoc/frlrfTeraDPGN4GNClientDataNavigatorOptionClassTopic.html

   for a list of the available options. Multiple options can be combined, separated by comma (',')

   Default value 'Default'

 

 OutputNulls

   If 'true' attributes that have the special 'null' value - i.e. that are not present in the object - are still exported,

   either as xsi:nil elements or as empty attributes

   Default: 'false'

 

 RefKeys

   'true' to export in the references to other objects (i.e. the values of reference, multi-reference and category attributes)

   also the key attribute(s) values of the referenced object, instead than just its database numeric id.

   Default: 'false'

 

 XsltUrl

   URL or file name of the Xsl transformation to apply to the source.

   Used if an XSLT is not specified directly using the Xslt element.

   The referenced XSLT can use the semplified XSL syntax

   Use the special URL 'self://localhost/do.ashx?cmd=config&amp;name=xsl_XXXXX' to get the XSL from the

   globl configuration named 'xsl_XXXXX'

-->

<XmlExportOptions

 xmlns="http://www.teradp.com/schemas/GN4/1/XmlExportOptions.xsd"

 AccessStrict="false"

 DataAsId="false"

 DataFiles="false"

 DataMaxSize="100000"

 Zip="true"

 ZipCompressionLevel="9"

 Encoding="UTF-8-NOBOM"

 Indent="No"

 NewLine="CRLF"

 OmitXmlDeclaration="false"

 MimeType="application/xml"

 MaxDepth="3"

 NavOptions="Default"

 OutputNulls="false"

 RefKeys="false"

 XsltUrl="">

 <!--

   List of counters to increment for each exported object

 

 <Counters>

   <Name>GlobalImpressions</Name>

 </Counters>

 -->

 <!--

   Optional parameters passed to the XSL transformation

   They are merged with the parameters passed explicitely to cmd4, srv4, do.ashx?cmd=feed or the LoadObject activity

 

 <Pars>

   <exportSettings xmlns="">

     <add key="test" value="test parameter value"/>

   </exportSettings>

 </Pars>

 -->

 <!--

   XSL transformation to apply to the source.

   If specified it has precedence over XsltUrl.

   Supports the semplified XSL syntax

 

 <Xslt>

   <object

     xmlns=""

     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

     type="{local-name()}"

     id="{@id}">

     <xsl:if test="$pars and $pars/*/add[@key='test']">

       <xsl:attribute name="testPar">

         <xsl:value-of select="$pars/*/add[@key='test']/@value"/>

       </xsl:attribute>

     </xsl:if>

   </object>

 </Xslt>

 -->

</XmlExportOptions>