Skip to content
Mamadou Sy edited this page Mar 23, 2016 · 2 revisions

<outputs>

List all possible ADX outputs.
A condition could be specified for each output to make it alternative.

Also see

Generation Rules

Attributes

Attribute name Require Type Description
defaultOutput true xsd:NCName Id of the default output to use when none of the outputs condition return true.
<outputs defaultOutput="html">
  <output id="flash">
     <description>Use Flash controls when Flash is available</description>
     <condition><![CDATA[ Browser.Support("Flash") And Browser.Support("Javascript") ]]></condition>
     <content fileName="swfObject.js" mode="share" position="foot" type="javascript" />
     <content fileName="expressIntall.swf" mode="share" position="none" type="flash" />
     <content fileName="flashEmbed.html" mode="dynamic" position="placeholder" type="html" />
     <content fileName="flashEmbed.js" mode="dynamic" position="foot" type="javascript" />
     <content fileName="default.swf" mode="static" position="none" type="flash" />
  </output>
  <output id="html" defaultGeneration="false">
     <description>Default HTML fallback output</description>
     <content type="css" fileName="default.css" mode="static" position="head" />
     <content type="html" fileName="default.html" mode="dynamic" position="placeholder" />
  </output>
</outputs>

<output>

Output of the ADX.
One for each kind of output.

Remarks

The order of the is important.
The system evaluate condition in the sequence order and break the evaluation once it reach a valid condition.
If no condition matches then it the system uses the <output> specified in the defaultOutput attribute of the <outputs> tag.

Recommendation

We recommend to place the fall-back output in the last position.

Also see

Output Selection Rules
Output Max. iterations Rules

Attributes

Attribute name Require Type Description
id true xsd:NCName Unique identifier of the current output.
masterPage ADP only true xsd:normalizedString Indicates the name of the file in the dynamic folder that will be used as a master page.
defaultGeneration
ADC Only
Deprecated
false xsd:boolean This features will be drop in the next version. Please avoid to use it
Indicates if the system must generate or not the default controls. (default false)
maxIterations ADC only false numberPattern Only take in account for question(s) inside a loop.
Indicates the maximum of iterations that could be managed by the ADC.
If a finite bound value is set, the engine will produce all expected iterations and stop immediately.
The next page will generate all other expected iterations until the engine reach the latest iteration, then it generate all remain controls merged into the same page

<description>

Full free text to describes the aim of the output

<output id="html">
  <description>HTML fallback when no output conditions match</description>
   ...
</output>

<condition>

AskiaScript code evaluated to determine if the current output should be use.
The AskiaScript should return a boolean value

Also see

Output Selection Rules

<output id="flash">
   <description>Use this output when Flash and Javascript is available</description>
   <condition><![CDATA[ Browser.Support("Flash") And Browser.Support("Javascript") ]]></condition>
   ...
</output>

<content>

Content used by the current output.

Also see

Contents rules

Attributes

Attribute name Require Type Description
type true Enumeration based on xsd:NCName
text
Arbitrary text based content. Will be inserted as it is when static and interpreted when dynamic.
Also see Text content rules
binary
Arbitrary binary content. Will not be inserted at all, expect if the <yield> node indicates how to insert it in the page.
The content must always be static or external.
Also see Binary content rules
html
HTML content. Will be inserted as it is when static, and interpreted when dynamic.
Also see HTML content rules
javascript
Javascript content. Will be inserted using the <script src /> tag when static or external
or using <script></script> tag when dynamic.
Also see Javascript content rules
css
CSS content. Will be inserted using <link href /> tag when static or share
or using the <style<>/style> tag when dynamic.
Also see CSS content rules
image
Image content. Will be inserted using the <img src /> tag.
The content must always be static or external.
Also see Image content rules
video
Video content. Will be inserted using the <video src/> tag. (HTML5)
The content must always be static or external.
Also see Video content rules
audio
Audio content. Will be inserted using the <audio src/> tag. (HTML5)
The content must always be static or share.
Also see Audio content rules
flash
Flash content. Will be inserted using the <object /> tag.
The content must always be static or external.
Also see Flash content rules
Indicates the type of the file, useful for the auto-generated HTML tags.
fileName true xsd:normalizedString Name of the file use to generate the content.
mode false Enumeration based on xsd:NCName
share
The share content is always associated with a file and must be place in the /Resources/Share/ folder of the ADX.
The share content will be extract in the resources folder of the survey /Resources/SurveyName/.
This kind of content, could be share across ADXs and will not be overrides when it already exist in the folder.
static
The static content is always associated with a file and must be place in the /Resources/Static/ folder of the ADX.
The static content will be extract in the resources folder of the ADX /Resources/SurveyName/ADXname/.
dynamic
The dynamic content could be file (text based) or in-line code define in the definition of the content.
It could embed AskiaScript to execute.
When the content is a file, it must be place in the /Resources/Dynamic folder of the ADX.
The dynamic content will not be extract but load in memory.
Indicate how the content will be treat and where the system should find the content file. (default ‘static’)
position false Enumeration based on xsd:NCName
none
The resource will not be rendered.
But it’s still available through HTTP request.
head
The resource will be inserted in the head section of the HTML document (<askia-head />).
Mostly use for CSS stylesheet.
placeholder ADC only
The resource will be inserted at the position of the ADC control.
Mostly use for the HTML injection.
foot
The resource will be inserted at the end of the document, just before the end of the closed body tag (<askia-foot />).
Mostly use for javascript insertion
Indicates how and where the system must render the current content. (default ‘none’)
<content fileName="jQuery.ui.css" mode="share" position="head" type="css" />
<content fileName="styles.css" mode="static" position="head" type="css" />
<content fileName="dynamicStyles.css" mode="dynamic" position="head" type="css" />

<content fileName="jQuery.js" mode="share" position="foot" type="javascript" />
<content fileName="config.js" mode="dynamic" position="foot" type="javascript" />
<content fileName="starRating.js" mode="static" position="foot" type="javascript" />

<content fileName="defaut.html" mode="dynamic" position="placeholder" type="html" />
<content fileName="map.png" mode="static" position="placeholder" type="image" />

<content fileName="swfObject.js" mode="share" position="head" type="javascript" />
<content fileName="expressIntall.swf" mode="share" position="none" type="flash" />
<content fileName="default.swf" mode="static" position="none" type="flash" />

<attribute>

Add or overwrite an attribute in the auto-generated HTML tags for the content type “css”, “javascript”, “image”, “video”, “audio”.

Also see

Content attributes rules

<content type="video" fileName="mymovie.ogv" type="static" position="placeholder">
   <attribute name="autoplay">
       <value>autoPlay</value>
   </attribute>
   <attribute name="poster">
        <value>mymovie.jpg</value>
   </attribute>
   <attribute name="controls">
        <value><![CDATA[ {%= CurrentADC.PropValue("controls") ]]></value>
   </attribute>
</content>
<content type="css" fileName="print.css" type="static" position="head">
   <attribute name="rel">
       <value>alternate</value>
   </attribute>
   <attribute name="media">
       <value>print</value>
   </attribute>
</content>

Attributes

Attribute name Require Type Description
name true xsd:token Name of the attribute to add or overwrite

<value>

Value of the attribute to add or overwrite.
This value could embed AskiaScript code to make it dynamic.

<attribute name="autoplay">
   <value><![CDATA[ {%= CurrentADC.PropValue("autoplay") %} ]]></value>
</attribute>
<attribute name="controls">
   <value>true</value>
</attribute>

<yield>

Overwrite the auto-generated HTML tags for the content type “css”, “javascript”, “image”, “video”, “audio”, “flash”.
It could embed AskiaScript to make it dynamic, it gives much more control about the generation.

<content fileName="HTML5Shim.js" type="javascript" mode="static" position="head">
   <yield>
     <![CDATA[
           <!--[if lte IE 9]>
            <script type="text/javascript"  src="{%= CurrentADC.URLTo("static/HTML5Shim.js") %}" ></script>
            <![endif]-->
     ]]>
   </yield>
</content>

<< Config – Info | Config – Properties >>