How to apply identity transformation and grouping at the same time
<items>
<user>
<id>8788989</id>
<firstname>test</firstname>
<lastname>user</lastname>
</user>
<info>test xml</info>
<fromdate><fromdate>
<todate></todate>
<item id="123" name="Java">
<price>1</price>
<description></description>
</item>
<item id="123" name="Java and XML">
<price>2</price>
<description></description>
</item>
<item id="234" name="python">
<price>3</price>
<description></description>
</item>
<item id="234" name="scala">
<price>3</price>
<description></description>
</item>
</items>
I want output as
<items>
<user>
<id>8788989</id>
<firstname>test</firstname>
<lastname>user</lastname>
</user>
<info>test xml</info>
<fromdate><fromdate>
<todate></todate>
<group>
<item id="123" name="Java">
<price>1</price>
<description></description>
</item>
<item id="123" name="Java and XML">
<price>2</price>
<description></description>
</item>
</group>
<group>
<item id="234" name="python">
<price>3</price>
<description></description>
</item>
<item id="234" name="scala">
<price>3</price>
<description></description>
</item>
</group>
</items>
Grouping is done on item/#id
You can group like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output indent="yes"/>
<xsl:template match="#* | node()">
<xsl:copy>
<xsl:apply-templates select="#* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="items">
<items>
<xsl:apply-templates select="* except item"/>
<xsl:for-each-group select="item" group-by="#id">
<group>
<xsl:apply-templates select="../item[#id = current()/#id]"/>
</group>
</xsl:for-each-group>
</items>
</xsl:template>
</xsl:stylesheet>
UPDATED ANSWER:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output indent="yes"/>
<xsl:template match="#* | node()">
<xsl:copy>
<xsl:apply-templates select="#* | node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="items">
<items>
<xsl:apply-templates select="* except item"/>
<xsl:for-each-group select="item" group-by="#id">
<group>
<xsl:apply-templates select="current-group()"/>
</group>
</xsl:for-each-group>
</items>
</xsl:template>
</xsl:stylesheet>
I have an given XML and I want to convert it in new xml and want to aggregate nodes based on status and orderId.
<?xml version="1.0" encoding="utf-8"?>
<OrderStatusUpdate>
<OrderStatusEvents>
<OrderStatusEvent>
<StoreCode>store1</StoreCode>
<OrderId>Order1</OrderId>
<ItemId>Item1</ItemId>
<OrderStatusDetails>
<OrderStatusDetail>
<OrderStatusEventTimeStamp>2017-03-19 03:37:05</OrderStatusEventTimeStamp>
<StatusName>Cancelled</StatusName>
</OrderStatusDetail>
</OrderStatusDetails>
</OrderStatusEvent>
<OrderStatusEvent>
<StoreCode>Store1</StoreCode>
<OrderId>Order1</OrderId>
<ItemId>Item2</ItemId>
<OrderStatusDetails>
<OrderStatusDetail>
<OrderStatusEventTimeStamp>2017-03-19 03:48:35</OrderStatusEventTimeStamp>
<StatusName>Cancelled</StatusName>
</OrderStatusDetail>
</OrderStatusDetails>
</OrderStatusEvent>
<OrderStatusEvent>
<StoreCode>Store1</StoreCode>
<OrderId>Order1</OrderId>
<ItemId>Item3</ItemId>
<OrderStatusDetails>
<OrderStatusDetail>
<OrderStatusEventTimeStamp>2017-03-19 03:48:35</OrderStatusEventTimeStamp>
<StatusName>Shipped</StatusName>
</OrderStatusDetail>
</OrderStatusDetails>
</OrderStatusEvent>
<OrderStatusEvent>
<StoreCode>Store1</StoreCode>
<OrderId>Order2</OrderId>
<ItemId>Item1</ItemId>
<OrderStatusDetails>
<OrderStatusDetail>
<OrderStatusEventTimeStamp>2017-03-19 03:48:35</OrderStatusEventTimeStamp>
<StatusName>Cancelled</StatusName>
</OrderStatusDetail>
</OrderStatusDetails>
</OrderStatusEvent>
</OrderStatusEvents>
</OrderStatusUpdate>
And I want an output like this. Here I am grouping elements based on status and orderId.
<Orders>
<group name="CANCELLED">
<STATUS ID="CANCELLED" DESCRIPTION="Goods Cancelled">
<ORDER ID="Order1">
<ORDER_ITEM item="item1" />
<ORDER_ITEM item="item2" />
</ORDER>
</STATUS>
<STATUS ID="CANCELLED" DESCRIPTION="Goods Cancelled">
<ORDER ID="Order2">
<ORDER_ITEM item="item1" />
</ORDER>
</STATUS>
</group>
<group name="SHIPPED">
<STATUS ID="SHIPPED" DESCRIPTION="Goods SHIPPED">
<ORDER ID="Order1">
<ORDER_ITEM item="item3" />
</ORDER>
</STATUS>
<group>
</Orders>
I am using the following xslt and it is working fine. Is there any way to improve this.
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="OrderStatusUpdate/OrderStatusEvents">
<Orders>
<xsl:for-each-group select="OrderStatusEvent" group-by="OrderStatusDetails/OrderStatusDetail/StatusName">
<xsl:variable name="group-name" select="current-grouping-key()" />
<group name="{current-grouping-key()}">
<xsl:for-each-group select="current-group()" group-by="OrderId">
<xsl:variable name="order-id" select="current-grouping-key()" />
<xsl:element name="STATUS">
<xsl:attribute name="ID"><xsl:value-of select="$group-name" /></xsl:attribute>
<xsl:attribute name="DESCRIPTION">Goods <xsl:value-of select="$group-name" /></xsl:attribute>
<xsl:element name="ORDER">
<xsl:attribute name="ID"><xsl:value-of select="$order-id" /></xsl:attribute>
<xsl:for-each select="current-group()">
<xsl:if test="$group-name = 'Shipped'">
<xsl:call-template name="Shipped">
<xsl:with-param name="nodes">
<xsl:copy-of select="." />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:if test="$group-name = 'Cancelled'">
<xsl:call-template name="Cancelled">
<xsl:with-param name="nodes">
<xsl:copy-of select="." />
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:element>
</xsl:for-each-group>
</group>
</xsl:for-each-group>
</Orders>
</xsl:template>
<xsl:template name="Shipped">
<xsl:param name="nodes">
</xsl:param>
<xsl:element name="ORDER_ITEM">
<xsl:attribute name="ID"><xsl:value-of select="$nodes/OrderStatusEvent/ItemId" /></xsl:attribute>
</xsl:element>
</xsl:template>
<xsl:template name="Cancelled">
<xsl:param name="nodes"></xsl:param>
<xsl:element name="ORDER_ITEM">
<xsl:attribute name="ID"><xsl:value-of select="$nodes/OrderStatusEvent/ItemId" /></xsl:attribute>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
It is easier to use literal result elements and attribute value templates as long as you don't need to compute element or attribute names at run-time and I don't think you need the two templates and call-template, it suffices to use
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="OrderStatusUpdate/OrderStatusEvents">
<Orders>
<xsl:for-each-group select="OrderStatusEvent" group-by="OrderStatusDetails/OrderStatusDetail/StatusName">
<xsl:variable name="group-name" select="current-grouping-key()" />
<group name="{current-grouping-key()}">
<xsl:for-each-group select="current-group()" group-by="OrderId">
<xsl:variable name="order-id" select="current-grouping-key()" />
<STATUS ID="{$group-name}" DESCRIPTION="Goods {$group-name}">
<ORDER ID="{$order-id}">
<xsl:apply-templates select="current-group()"/>
</ORDER>
</STATUS>
</xsl:for-each-group>
</group>
</xsl:for-each-group>
</Orders>
</xsl:template>
<xsl:template match="OrderStatusEvent">
<ORDER_ITEM ID="{ItemId}"/>
</xsl:template>
</xsl:stylesheet>
I'm using XInclude to import several forms as tabs on a multi-tabbed container form (using fr:tabbable and fr:tab). I am importing the model, binds, resources and body of each sub-form.
One of the components on a tab is an XBL component containing an HTML img element pointing to a static png image file. The image is displayed ok when the sub-form is published and invoked on its own, but when imported on to the multi-tabbed form the image link is broken.
When inspecting the source, the path to the image in the /xbl folder has been modified to include the oxf:/ protocol.
In addition, there is logic on the xbl form control to make it non-relevant when the form is loaded and depends on a checkbox to make it relevant. When the logic is removed, the image is displayed.
I have done some more testing and confirm that the problem occurs when enabling non-relevant controls on a form which has been imported via xinclude.
Orbeon is also in persistence mode using the CRUD REST api to save and publish forms as text files.
Is there anything I can do to make sure the image path is initialised when it is non-relevant?
Many thanks,
Import.xhtml
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder">
<xh:head>
<xh:title>Import Test</xh:title>
<xf:model id="fr-form-model" xxf:expose-xpath-types="true">
<!-- Main instance -->
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
<form>
<xi:include href="oxf:/forms/Testing/FootMapTest/form/form.xhtml"
xpointer="xpath(//form/*)"/>
</form>
</xf:instance>
<!-- Bindings -->
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xi:include href="oxf:/forms/Testing/FootMapTest/form/form.xhtml"
xpointer="xpath(//xf:model/xf:bind[#id='fr-form-binds']/*)"/>
</xf:bind>
<!-- Metadata -->
<xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">
<metadata>
<application-name>Testing</application-name>
<form-name>ImportTest</form-name>
<title xml:lang="en">Import Test</title>
<description xml:lang="en"/>
</metadata>
</xf:instance>
<!-- Attachments -->
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
<attachments>
<css mediatype="text/css" filename="" size=""/>
<pdf mediatype="application/pdf" filename="" size=""/>
</attachments>
</xf:instance>
<!-- All form resources -->
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
<resources>
<resource xml:lang="en">
<xi:include href="oxf:/forms/Testing/FootMapTest/form/form.xhtml"
xpointer="xpath(//resources/resource[#xml:lang='en']/*)"/>
</resource>
</resources>
</xf:instance>
<!-- Utility instances for services -->
<xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">
<request/>
</xf:instance>
<xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">
<response/>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<fr:view>
<fr:body xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xbl="http://www.w3.org/ns/xbl">
<fr:tabbable>
<fr:tab>
<fr:label>Tab 1</fr:label>
<xi:include href="oxf:/forms/Testing/FootMapTest/form/form.xhtml"
xpointer="xpath(//xh:body/fr:view/fr:body/*)"/>
</fr:tab>
</fr:tabbable>
</fr:body>
</fr:view>
</xh:body>
</xh:html>
FootMapTest.xhtml
<xh:html xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:sql="http://orbeon.org/oxf/xml/sql"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:fb="http://orbeon.org/oxf/xml/form-builder">
<xh:head>
<xh:title>FootMap Test</xh:title>
<xf:model id="fr-form-model" xxf:expose-xpath-types="true">
<!-- Main instance -->
<xf:instance id="fr-form-instance" xxf:exclude-result-prefixes="#all" xxf:index="id">
<form>
<section-1>
<showFoot/>
<control-2/>
</section-1>
</form>
</xf:instance>
<!-- Bindings -->
<xf:bind id="fr-form-binds" ref="instance('fr-form-instance')">
<xf:bind id="section-1-bind" name="section-1" ref="section-1">
<xf:bind id="control-2-bind" ref="control-2" name="control-2"
relevant="$showFoot=true()"/>
<xf:bind id="showFoot-bind" ref="showFoot" name="showFoot" type="xf:boolean"/>
</xf:bind>
</xf:bind>
<!-- Metadata -->
<xf:instance xxf:readonly="true" id="fr-form-metadata" xxf:exclude-result-prefixes="#all">
<metadata>
<application-name>Testing</application-name>
<form-name>FootMapTest</form-name>
<title xml:lang="en">FootMap Test</title>
<description xml:lang="en"/>
</metadata>
</xf:instance>
<!-- Attachments -->
<xf:instance id="fr-form-attachments" xxf:exclude-result-prefixes="#all">
<attachments>
<css mediatype="text/css" filename="" size=""/>
<pdf mediatype="application/pdf" filename="" size=""/>
</attachments>
</xf:instance>
<!-- All form resources -->
<xf:instance xxf:readonly="true" id="fr-form-resources" xxf:exclude-result-prefixes="#all">
<resources>
<resource xml:lang="en">
<showFoot>
<label>Show Foot?</label>
<hint/>
</showFoot>
<control-2>
<label/>
<hint/>
</control-2>
<section-1>
<label>Untitled Section</label>
</section-1>
</resource>
</resources>
</xf:instance>
<!-- Utility instances for services -->
<xf:instance id="fr-service-request-instance" xxf:exclude-result-prefixes="#all">
<request/>
</xf:instance>
<xf:instance id="fr-service-response-instance" xxf:exclude-result-prefixes="#all">
<response/>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<fr:view>
<fr:body xmlns:p="http://www.orbeon.com/oxf/pipeline"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xbl="http://www.w3.org/ns/xbl">
<fr:section id="section-1-control" bind="section-1-bind">
<xf:label ref="$form-resources/section-1/label"/>
<fr:grid>
<xh:tr>
<xh:td>
<fr:yesno-input xmlns="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
id="showFoot-control"
bind="showFoot-bind">
<xf:label ref="$form-resources/showFoot/label"/>
<xf:hint ref="$form-resources/showFoot/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</fr:yesno-input>
</xh:td>
<xh:td>
<nhs:footmap xmlns:nhs="http://www.wales.nhs.uk/"
xmlns="http://orbeon.org/oxf/xml/form-builder"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
side="left"
siteselect=""
missingtoes=""
testorder=""
id="control-2-control"
bind="control-2-bind">
<xf:label ref="$form-resources/control-2/label"/>
<xf:hint ref="$form-resources/control-2/hint"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</nhs:footmap>
</xh:td>
</xh:tr>
</fr:grid>
</fr:section>
</fr:body>
</fr:view>
</xh:body>
</xh:html>
footmap.xbl
<xbl:xbl xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:saxon="http://saxon.sf.net/"
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:oxf="http://www.orbeon.com/oxf/processors"
xmlns:xbl="http://www.w3.org/ns/xbl"
xmlns:xxbl="http://orbeon.org/oxf/xml/xbl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:nhs="http://www.wales.nhs.uk/">
<xbl:script src="/xbl/nhs/footmap/footmap.js"/>
<xbl:binding id="nhs-footmap" element="nhs|footmap"
xxf:external-events="nhs-footmap-updated nhs-footmap-refresh"
xxbl:mode="lhha binding value extenal-value focus"
xxbl:container="span">
<metadata xmlns="http://orbeon.org/oxf/xml/form-builder">
<display-name lang="en">Foot Map</display-name>
<icon lang="en">
<small-icon>/apps/fr/style/images/silk/image.png</small-icon>
<large-icon>/apps/fr/style/images/silk/image.png</large-icon>
</icon>
<templates>
<view>
<nhs:footmap side="left" siteselect="" missingtoes="" testorder="">
<xf:label ref=""/>
<xf:hint ref=""/>
<xf:help ref=""/>
<xf:alert ref=""/>
</nhs:footmap>
</view>
</templates>
<control-details>
<xf:select1 ref="#side">
<xf:label>Side:</xf:label>
<xf:hint>Which foot?</xf:hint>
<xf:item>
<xf:label>Left</xf:label>
<xf:value>left</xf:value>
</xf:item>
<xf:item>
<xf:label>Right</xf:label>
<xf:value>right</xf:value>
</xf:item>
</xf:select1>
<xf:select ref="#siteselect" appearance="full">
<xf:label>Sites:</xf:label>
<xf:hint>Which sites?</xf:hint>
<xf:item selected="true">
<xf:label>Big Toe (1):</xf:label>
<xf:value>1</xf:value>
</xf:item>
<xf:item selected="true">
<xf:label>Middle Toe (3):</xf:label>
<xf:value>3</xf:value>
</xf:item>
<xf:item selected="true">
<xf:label>Little Toe (5):</xf:label>
<xf:value>5</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Plantar</xf:label>
<xf:value>6</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Medial</xf:label>
<xf:value>7</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Lateral</xf:label>
<xf:value>8</xf:value>
</xf:item>
</xf:select>
<xf:select ref="#missingtoes" appearance="full">
<xf:label>Missing Toes:</xf:label>
<xf:hint>Which toes are missing?</xf:hint>
<xf:item selected="false">
<xf:label>Big Toe (1):</xf:label>
<xf:value>1</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Index Toe (2):</xf:label>
<xf:value>2</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Middle Toe (3):</xf:label>
<xf:value>3</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Fourth Toe (4):</xf:label>
<xf:value>4</xf:value>
</xf:item>
<xf:item selected="false">
<xf:label>Little Toe (5):</xf:label>
<xf:value>5</xf:value>
</xf:item>
</xf:select>
<xf:input ref="#testorder">
<xf:label>Test Order (json):</xf:label>
<xf:hint>What order should sites be tested?</xf:hint>
</xf:input>
</control-details>
</metadata>
<xbl:resources>
<xbl:style src="/xbl/nhs/footmap/footmap.css"/>
</xbl:resources>
<xbl:handlers>
<xbl:handler event="nhs-footmap-updated" phase="target">
<!-- <xf:message level="modal">
<xf:output value="event('states')" />
</xf:message> -->
<xf:var name="jsonstates" select="event('states')" />
<xf:setvalue ref="xxf:binding('nhs-footmap')" value="$jsonstates" />
</xbl:handler>
<xbl:handler type="javascript" ev:event="xforms-enabled" phase="target">
ORBEON.xforms.XBL.instanceForControl(this).updateAreas();
</xbl:handler>
<xbl:handler type="javascript" ev:event="xforms-disabled" phase="target">
//ORBEON.xforms.XBL.instanceForControl(this).hide();
</xbl:handler>
<!-- <xbl:handler type="javascript" event="nhs-footmap-refresh" phase="target">
ORBEON.xforms.XBL.instanceForControl(this).updateAreas();
</xbl:handler> -->
<xbl:handler type="javascript" event="xforms-value-changed" phase="target">
ORBEON.xforms.XBL.instanceForControl(this).updateAreas();
</xbl:handler>
</xbl:handlers>
<xbl:template xxbl:transform="oxf:unsafe-xslt">
<xsl:transform version="2.0">
<xsl:import href="oxf:/oxf/xslt/utils/xbl.xsl"/>
<xsl:template match="/*">
<xf:group class="nhs-footmap-container">
<xf:model id="footmap-model">
<xf:instance id="areastates">
<json type="object">
<data/>
</json>
</xf:instance>
<xf:instance id="local">
<model>
<side/>
<areas/>
</model>
</xf:instance>
</xf:model>
<!-- Variable pointing to external single-node binding -->
<xf:var name="binding" value="xxf:binding('nhs-footmap')"/>
<xf:var name="binding-context" value="xxf:binding-context('nhs-footmap')"/>
<xf:var name="local" value="instance('local')"/>
<xf:var name="view" value="exf:readonly($binding) and property('xxf:readonly-appearance') = 'static'"/>
<xsl:copy-of select="xxbl:parameter(., 'side')"/>
<xf:var name="leftFoot" value="$side = 'left'" />
<xf:var name="rightFoot" value="$side = 'right'" />
<xf:setvalue ref="instance('local')/side" value="{{$side}}" />
<xf:var name="requestPath" select="xxf:get-request-path()" />
<xsl:copy-of select="xxbl:parameter(., 'siteselect')"/>
<xf:var name="toe1" value="tokenize($siteselect, '\s+') = '1'" />
<xf:var name="toe3" value="tokenize($siteselect, '\s+') = '3'" />
<xf:var name="toe5" value="tokenize($siteselect, '\s+') = '5'" />
<xf:var name="plantar" value="tokenize($siteselect, '\s+') = '6'" />
<xf:var name="medial" value="tokenize($siteselect, '\s+') = '7'" />
<xf:var name="lateral" value="tokenize($siteselect, '\s+') = '8'" />
<xsl:copy-of select="xxbl:parameter(., 'missingtoes')"/>
<xf:var name="missing-toe1" value="tokenize($missingtoes, '\s+') = '1'" />
<xf:var name="missing-toe2" value="tokenize($missingtoes, '\s+') = '2'" />
<xf:var name="missing-toe3" value="tokenize($missingtoes, '\s+') = '3'" />
<xf:var name="missing-toe4" value="tokenize($missingtoes, '\s+') = '4'" />
<xf:var name="missing-toe5" value="tokenize($missingtoes, '\s+') = '5'" />
<xsl:copy-of select="xxbl:parameter(., 'testorder')"/>
<xf:var name="notestorder" value="string-length($testorder)=0" />
<!--<xf:group id="component-group" ref="$binding[not($view)]">-->
<xf:group id="component-group" ref="$binding">
<xf:input ref="$binding" id="nhs-footmap-states" class="nhs-footmap-states" />
<xh:div class="xbl-nhs-footmap-imagemap-div nhs-footmap-imgsize">
<xh:img class="nhs-footmap-footimage" src="/xbl/nhs/footmap/img/{{$side}}foot.png" usemap="#foot-imagemap-{{$side}}" />
<xf:group ref=".[$toe1 and not($missing-toe1)]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe1 nhs-footmap-site"> <xh:span class="badge">N</xh:span></xh:a>
</xf:group>
<xf:group ref=".[$missing-toe1]">
<xh:a href="#" data-value="-" class="nhs-footmap-{{$side}}-toe1 nhs-footmap-site toe-missing"> <xh:span class="badge"><xh:i class="icon-minus icon-white"/></xh:span></xh:a>
</xf:group>
<xf:group ref=".[$toe3 and not($missing-toe3)]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe3 nhs-footmap-site"> <xh:span class="badge">N</xh:span> </xh:a>
</xf:group>
<xf:group ref=".[$missing-toe3]">
<xh:a href="#" data-value="-" class="nhs-footmap-{{$side}}-toe3 nhs-footmap-site toe-missing"> <xh:span class="badge"><xh:i class="icon-minus icon-white"/></xh:span></xh:a>
</xf:group>
<xf:group ref=".[$toe5 and not($missing-toe5)]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe5 nhs-footmap-site"> <xh:span class="badge">N</xh:span> </xh:a>
</xf:group>
<xf:group ref=".[$missing-toe5]">
<xh:a href="#" data-value="-" class="nhs-footmap-{{$side}}-toe5 nhs-footmap-site toe-missing"> <xh:span class="badge"><xh:i class="icon-minus icon-white"/></xh:span></xh:a>
</xf:group>
<xf:group ref=".[$plantar]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe6 nhs-footmap-site"> <xh:span class="badge">N</xh:span> </xh:a>
</xf:group>
<xf:group ref=".[$medial]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe7 nhs-footmap-site"> <xh:span class="badge">N</xh:span> </xh:a>
</xf:group>
<xf:group ref=".[$lateral]">
<xh:a href="#" data-value="N" class="nhs-footmap-{{$side}}-toe8 nhs-footmap-site"> <xh:span class="badge">N</xh:span> </xh:a>
</xf:group>
<xf:group ref=".[not($notestorder)]">
<xh:span class="nhs-footmap-{{$side}}-testorder1 nhs-footmap-testorder badge" />
<xh:span class="nhs-footmap-{{$side}}-testorder3 nhs-footmap-testorder badge" />
<xh:span class="nhs-footmap-{{$side}}-testorder5 nhs-footmap-testorder badge" />
<xh:span class="nhs-footmap-{{$side}}-testorder6 nhs-footmap-testorder badge" />
<xh:span class="nhs-footmap-{{$side}}-testorder7 nhs-footmap-testorder badge" />
<xh:span class="nhs-footmap-{{$side}}-testorder8 nhs-footmap-testorder badge" />
</xf:group>
</xh:div>
<!--<xf:trigger id="resetButton">
<xf:label>Reset</xf:label>
<xf:action type="javascript" event="DOMActivate">
ORBEON.xforms.XBL.instanceForControl(this).reset();
</xf:action>
</xf:trigger>-->
<!--<xf:trigger id="absentButton">
<xf:label>Absent</xf:label>
<xf:action type="javascript" event="DOMActivate">
ORBEON.xforms.XBL.instanceForControl(this).absent();
</xf:action>
</xf:trigger>-->
<!-- Properties -->
</xf:group>
<!-- <xf:group ref="$binding[$view]"/> -->
</xf:group>
</xsl:template>
</xsl:transform>
</xbl:template>
</xbl:binding>
</xbl:xbl>
Trying to integrate jasperreports with struts2....and i am very new to jasperreports ....designed reports using eclipse report designer
here is my jrmxlЖ
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0 -->
<!-- 2015-08-24T16:05:04 -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Coffee_Landscape" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="df013db5-f76e-44d3-b0df-bcbc46d93160">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true"/>
<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
<style name="Detail" fontName="Arial" fontSize="12"/>
<style name="Row" mode="Transparent">
<conditionalStyle>
<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
<style backcolor="#E6DAC3"/>
</conditionalStyle>
</style>
<field name="transaction_Date" class="java.sql.Timestamp">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="amount_Of_Sale" class="java.math.BigDecimal">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="discount_Amount" class="java.math.BigDecimal">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="136" splitType="Stretch">
<image>
<reportElement x="0" y="0" width="164" height="126" uuid="1c003177-754c-448f-8ce1-16868856f545"/>
<imageExpression><![CDATA["pctv-blue-rect.png"]]></imageExpression>
</image>
<staticText>
<reportElement style="Title" x="190" y="0" width="443" height="62" uuid="bc1ce1da-8232-46ea-be55-cec4abb986dd"/>
<textElement verticalAlignment="Middle"/>
<text><![CDATA[MyFirstJasper]]></text>
</staticText>
<staticText>
<reportElement style="SubTitle" x="303" y="62" width="196" height="22" uuid="f6a78448-8260-4445-a9e0-e3fb53b080d9"/>
<textElement>
<font fontName="Times New Roman"/>
</textElement>
<text><![CDATA[Coffee SubTitle]]></text>
</staticText>
<staticText>
<reportElement x="172" y="94" width="383" height="42" uuid="8240065e-64b6-4170-b5d9-6341598e7b35"/>
<textElement textAlignment="Right">
<font size="10"/>
</textElement>
<text><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce auctor purus gravida arcu aliquam mattis. Donec et nulla libero, ut varius massa. Nulla sed turpis elit. Etiam aliquet mauris a ligula hendrerit in auctor leo lobortis.]]></text>
</staticText>
</band>
</title>
<pageHeader>
<band splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="16" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="15" width="802" height="1" uuid="e9d2002a-c8ee-4649-a258-640dad29110c"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
<staticText>
<reportElement style="Column header" x="0" y="0" width="267" height="15" forecolor="#736343" uuid="732f1c0f-9a82-40f6-a3ec-adc1a7974b20"/>
<text><![CDATA[TRANSACTION DATE]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="267" y="0" width="267" height="15" forecolor="#736343" uuid="3d530dc4-b1f1-4fc8-97a9-caf5e9880788"/>
<text><![CDATA[AMOUNT OF SALE]]></text>
</staticText>
<staticText>
<reportElement style="Column header" x="534" y="0" width="267" height="15" forecolor="#736343" uuid="79cddcd9-d19c-4737-bef4-4f5913c70e06"/>
<text><![CDATA[DISCOUNT AMOUNT]]></text>
</staticText>
</band>
</columnHeader>
<detail>
<band height="15" splitType="Stretch">
<frame>
<reportElement style="Row" mode="Opaque" x="0" y="0" width="802" height="15" uuid="fa7cec56-4ec1-48e6-a26e-7266a995d174"/>
<textField isStretchWithOverflow="true">
<reportElement style="Detail" x="0" y="0" width="267" height="15" uuid="8af81006-b893-4305-b756-5393650dbe47"/>
<textFieldExpression><![CDATA[$F{transaction_Date}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement style="Detail" x="267" y="0" width="267" height="15" uuid="0b740c0b-0299-4454-b6d1-98fba48bd8d1"/>
<textFieldExpression><![CDATA[$F{amount_Of_Sale}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement style="Detail" x="534" y="0" width="267" height="15" uuid="135c7c39-45d3-4b00-a67e-58caf29dc186"/>
<textFieldExpression><![CDATA[$F{discount_Amount}]]></textFieldExpression>
</textField>
</frame>
</band>
</detail>
<columnFooter>
<band height="6" splitType="Stretch">
<line>
<reportElement positionType="FixRelativeToBottom" x="0" y="3" width="802" height="1" uuid="fa5e88d5-a011-4e32-8f12-ce923f903111"/>
<graphicElement>
<pen lineWidth="0.5" lineColor="#999999"/>
</graphicElement>
</line>
</band>
</columnFooter>
<pageFooter>
<band height="25" splitType="Stretch">
<frame>
<reportElement mode="Opaque" x="-21" y="1" width="843" height="24" forecolor="#D0B48E" backcolor="#F2EBDF" uuid="5d8169bd-4a75-48c8-8a68-6d3ad5ba9402"/>
<textField evaluationTime="Report">
<reportElement style="Column header" x="783" y="1" width="40" height="20" forecolor="#736343" uuid="e5e27efa-b599-499b-9ca3-848cb511cb7b"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[" " + $V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField>
<reportElement style="Column header" x="703" y="1" width="80" height="20" forecolor="#736343" uuid="18cfe1ca-f7d6-48b0-9827-28578b42a5e0"/>
<textElement textAlignment="Right" verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA["Page "+$V{PAGE_NUMBER}+" of"]]></textFieldExpression>
</textField>
<textField pattern="EEEEE dd MMMMM yyyy">
<reportElement style="Column header" x="1" y="1" width="197" height="20" forecolor="#736343" uuid="fbce24bb-3cb1-44a3-8eec-8c067ddbe5b5"/>
<textElement verticalAlignment="Middle">
<font size="10" isBold="false"/>
</textElement>
<textFieldExpression><![CDATA[new java.util.Date()]]></textFieldExpression>
</textField>
</frame>
</band>
</pageFooter>
<summary>
<band splitType="Stretch"/>
</summary>
</jasperReport>
And Struts.xml
<action name="myJasperTest" class="com.pincodetv.jasper.JasperAction">
<result name="success" type="jasper">
<param name="location">/jasper/our_compiled_template.jasper</param>
<param name="dataSource">myList</param>
<param name="format">PDF</param>
</result>
</action>
Jars which i have in lib
struts2-jasperreports-plugin-2.2.3.jar
jasperreports-6.1.0.jar
jasperreports-fonts-6.1.0.jar
jasperreports-javaflow-6.1.0.jar
The error logs...
java.lang.NoSuchMethodError: net.sf.jasperreports.engine.util.JRLoader.loadObject(Ljava/lang/String;)Ljava/lang/Object;
at org.apache.struts2.views.jasperreports.JasperReportsResult.doExecute(JasperReportsResult.java:321)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:371)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:275)
at org.apache.struts2.interceptor.DeprecationInterceptor.intercept(DeprecationInterceptor.java:41)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:256)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:167)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:73)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:91)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:252)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:193)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:189)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)
at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
i got the same problem, i used struts2, jasper-report 5.6.0, japer report library 5.6.0. how i solved my problem is just added class JRLoader download here:
http://grepcode.com/file/repo1.maven.org/maven2/net.sf.jasperreports/jasperreports/4.5.0/net/sf/jasperreports/engine/util/JRLoader.java
add the joda library in you project library,
joda download here:
https://github.com/JodaOrg/joda-time/releases/download/v2.9.4/joda-time-2.9.4-dist.tar.gz
create package in you project net.sf.jasperreports.engine.util
and put the JRLoader.java in that package, then run your project
viola.... it's work....
How to change the GUI of the child window in silverlight , how to apply template or style any good example reference will help.
thanks in advance
For addition information:
I would like to change the title bar shape, the close button shape and the body area shape as well, you can say I want to change the View of the childWidow control.
Here's the template as outputted from Blend.
<ControlTemplate x:Key="ChildWindowControlTemplate1" TargetType="controls:ChildWindow">
<Grid x:Name="Root">
<Grid.Resources>
<Style x:Key="ButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#FF1F3B53"/>
<Setter Property="Foreground" Value="#FF000000"/>
<Setter Property="Padding" Value="3"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush">
<Setter.Value>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFA3AEB9" Offset="0"/>
<GradientStop Color="#FF8399A9" Offset="0.375"/>
<GradientStop Color="#FF718597" Offset="0.375"/>
<GradientStop Color="#FF617584" Offset="1"/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid x:Name="grid" Background="#02FFFFFF" HorizontalAlignment="Center" Height="14" VerticalAlignment="Center" Width="15">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<DoubleAnimation Duration="0" To="0.95" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
</Storyboard>
</VisualState>
<VisualState x:Name="Pressed">
<Storyboard>
<DoubleAnimation Duration="0" To="0.85" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz2">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz1">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="X_Fuzz0">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="X"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Path x:Name="X_Fuzz2" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#14C51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#14C51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="1.3" ScaleX="1.3"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="X_Fuzz1" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#1EC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="#1EC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="1.1" ScaleX="1.1"/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path x:Name="X_Fuzz0" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFC51900" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="1" Stretch="Fill" Stroke="#FFC51900" Visibility="Collapsed" VerticalAlignment="Center" Width="9"/>
<Path x:Name="X" Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z" Fill="#FFFFFFFF" HorizontalAlignment="Center" Height="8" Margin="0,-1,0,0" Opacity="0.7" Stretch="Fill" VerticalAlignment="Center" Width="9">
<Path.Stroke>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF313131" Offset="1"/>
<GradientStop Color="#FF8E9092" Offset="0"/>
</LinearGradientBrush>
</Path.Stroke>
</Path>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStates">
<VisualState x:Name="Open">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="0" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1"/>
<SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.45" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Closed">
<Storyboard>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Overlay">
<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
<EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="0" Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY" Storyboard.TargetName="ContentRoot">
<SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid x:Name="Overlay" Background="{TemplateBinding OverlayBrush}" HorizontalAlignment="Stretch" Margin="0" Opacity="{TemplateBinding OverlayOpacity}" VerticalAlignment="Top"/>
<Grid x:Name="ContentRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Grid.RenderTransform>
<Border BorderBrush="#14000000" BorderThickness="1" Background="#14000000" CornerRadius="2" HorizontalAlignment="Stretch" Margin="-1" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0F000000" BorderThickness="1" Background="#0F000000" CornerRadius="2.25" HorizontalAlignment="Stretch" Margin="-2" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0C000000" BorderThickness="1" Background="#0C000000" CornerRadius="2.5" HorizontalAlignment="Stretch" Margin="-3" VerticalAlignment="Stretch"/>
<Border BorderBrush="#0A000000" BorderThickness="1" Background="#0A000000" CornerRadius="2.75" HorizontalAlignment="Stretch" Margin="-4" VerticalAlignment="Stretch"/>
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="#FFFFFFFF" CornerRadius="2">
<Border CornerRadius="1.5" Margin="1">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFE5E8EB" Offset="1"/>
<GradientStop Color="#FFF6F8F9" Offset="0"/>
</LinearGradientBrush>
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Border x:Name="Chrome" BorderBrush="#FFFFFFFF" BorderThickness="0,0,0,1" Width="Auto" Background="{StaticResource LightBackground}">
<Grid Height="Auto" Width="Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="30"/>
</Grid.ColumnDefinitions>
<ContentControl Content="{TemplateBinding Title}" FontWeight="Bold" HorizontalAlignment="Stretch" IsTabStop="False" Margin="6,0,6,0" VerticalAlignment="Center" Background="White" Foreground="White"/>
<Button x:Name="CloseButton1" Grid.Column="1" HorizontalAlignment="Center" Height="14" IsTabStop="False" Style="{StaticResource ButtonStyle}" VerticalAlignment="Center" Width="15" Foreground="White"/>
</Grid>
</Border>
<Border Background="{TemplateBinding Background}" Margin="0" Grid.Row="1">
<ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
</Grid>
</Border>
</Border>
</Grid>
</Grid>
</ControlTemplate>
HTH, Stimul8d