<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ben&#039;s Blog &#187; output path</title>
	<atom:link href="http://www.benh.co.uk/tag/output-path/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benh.co.uk</link>
	<description></description>
	<lastBuildDate>Thu, 26 Jan 2012 21:39:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Referencing An XML Element Within An Output Path</title>
		<link>http://www.benh.co.uk/alfresco/web-forms-xforms/referencing-an-xml-element-within-an-output-path/</link>
		<comments>http://www.benh.co.uk/alfresco/web-forms-xforms/referencing-an-xml-element-within-an-output-path/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 11:31:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Forms - XForms]]></category>
		<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[output path]]></category>
		<category><![CDATA[web forms]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=53</guid>
		<description><![CDATA[When creating an XML asset using a Web Form, it is sometimes required for an element of the output XML file, to be used within the output path.]]></description>
			<content:encoded><![CDATA[<p>When creating an XML asset using a Web Form, it is sometimes required for an element of the output XML file, to be used within the output path. For example, if it was required that the save directory was input by the user. The examples below shows two output path strings that could be used to acheive this. In this example the “region” element is a user input within the web form, and the produced XML file is saved into this folder within the users sandbox.</p>
<p><span id="more-53"></span></p>
<h2>Output Path Pattern</h2>
<pre class="code">/${webapp}/partner-data/${xml['/*[name()="pe:partner_entrance"]/*[name()="pe:region"]']}/
${name}.xml</pre>
<p><strong>or</strong></p>
<pre class="code">/${webapp}/partner-data/${xml['pe:partner_entrance']['pe:region']/${name}.xml</pre>
<h2>Sample XSD (Web Form)</h2>
<pre class="code">&lt;?xml version="1.0"?&gt;

&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
	   xmlns:pe="http://www.alfresco.org/alfresco/pe"
           targetNamespace="http://www.alfresco.org/alfresco/pe"
           elementFormDefault="qualified"&gt;

  &lt;xs:element name="partner_entrance"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="region" type="xs:normalizedString"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;</pre>
<h2>Sample XML (Produced XML File)</h2>
<pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;pe:partner_entrance xmlns:alf="http://www.alfresco.org"
xmlns:chiba="http://chiba.sourceforge.net/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:pe="http://www.alfresco.org/alfresco/pe"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;

&lt;pe:region&gt;APAC&lt;/pe:region&gt;
&lt;/pe:partner_entrance&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/web-forms-xforms/referencing-an-xml-element-within-an-output-path/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

