Acumatica Generic inquiry default to last week - customization

How do I default the generic inquiry to show last week data by default.
I want the GI to show last week data when I do View Inquiry, but also be able to change the dates from parameters later.

For the GI parameter default values you can use #WeekStart-1 and #WeekEnd-1 as shown in the screen shot...
The result if today is 11/3/17 will return a start of 10/22 and end of 10/28
You can see the possible date functions if using a date field as the parameter "Schema Field" and you check "From Schema" as shown below...
For the Generic Inquiry I used in the example, below is the XML. Save the contents in an XML file and upload as a GI if you want to test it.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<data-set>
<relations format-version="3" relations-version="20170805" main-table="GIDesign">
<link from="GIFilter (DesignID)" to="GIDesign (DesignID)" />
<link from="GIGroupBy (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassAction (DesignID)" to="GIDesign (DesignID)" />
<link from="GIMassUpdateField (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationScreen (DesignID)" to="GIDesign (DesignID)" />
<link from="GINavigationParameter (DesignID, ScreenID)" to="GINavigationScreen (DesignID, ScreenID)" />
<link from="GIOn (DesignID, RelationNbr)" to="GIRelation (DesignID, LineNbr)" />
<link from="GIRecordDefault (DesignID)" to="GIDesign (DesignID)" />
<link from="GIRelation (DesignID, ParentTable)" to="GITable (DesignID, Alias)" />
<link from="GIRelation (DesignID, ChildTable)" to="GITable (DesignID, Alias)" />
<link from="GIResult (DesignID)" to="GIDesign (DesignID)" />
<link from="GIResult (ObjectName, DesignID)" to="GITable (Alias, DesignID)" />
<link from="GISort (DesignID)" to="GIDesign (DesignID)" />
<link from="GITable (DesignID)" to="GIDesign (DesignID)" />
<link from="GIWhere (DesignID)" to="GIDesign (DesignID)" />
<link from="SiteMap (Url)" to="GIDesign (DesignID)" type="WeakByUrl" linkname="toDesignById" baseurl="~/GenericInquiry/GenericInquiry.aspx" paramnames="id" />
<link from="SiteMap (Url)" to="GIDesign (Name)" type="WeakByUrl" linkname="toDesignByName" baseurl="~/GenericInquiry/GenericInquiry.aspx" />
<link from="ListEntryPoint (ListScreenID)" to="SiteMap (ScreenID)" />
<link from="SiteMap (ScreenID)" to="GIDesign (PrimaryScreenIDNew)" linkname="to1Screen" />
<link from="SiteMap (NodeID)" to="SiteMap (ParentID)" type="WeakToParent" recursive-nesting="yes" include-parents="False" />
<link from="MUIScreen (NodeID)" to="SiteMap (NodeID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUIScreen (WorkspaceID)" type="FromMaster" linkname="workspaceToScreen" split-location="yes" updateable="True" />
<link from="MUISubcategory (SubcategoryID)" to="MUIScreen (SubcategoryID)" type="FromMaster" updateable="True" />
<link from="MUITile (ScreenID)" to="SiteMap (ScreenID)" />
<link from="MUIWorkspace (WorkspaceID)" to="MUITile (WorkspaceID)" type="FromMaster" linkname="workspaceToTile" split-location="yes" updateable="True" />
<link from="MUIArea (AreaID)" to="MUIWorkspace (AreaID)" type="FromMaster" updateable="True" />
<link from="MUIPinnedScreen (NodeID, WorkspaceID)" to="MUIScreen (NodeID, WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="MUIFavoriteWorkspace (WorkspaceID)" to="MUIWorkspace (WorkspaceID)" type="WeakIfEmpty" isEmpty="Username" />
<link from="GIDesign (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIFilter (NoteID)" to="GIFilterKvExt (RecordID)" type="RowKvExt" />
<link from="GIGroupBy (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIOn (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIRelation (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIResult (NoteID)" to="GIResultKvExt (RecordID)" type="RowKvExt" />
<link from="GISort (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GITable (NoteID)" to="Note (NoteID)" type="Note" />
<link from="GIWhere (NoteID)" to="Note (NoteID)" type="Note" />
</relations>
<layout>
<table name="GIDesign">
<table name="GIFilter" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIFilterKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="GIGroupBy" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIMassAction" uplink="(DesignID) = (DesignID)" />
<table name="GIMassUpdateField" uplink="(DesignID) = (DesignID)" />
<table name="GINavigationScreen" uplink="(DesignID) = (DesignID)">
<table name="GINavigationParameter" uplink="(DesignID, ScreenID) = (DesignID, ScreenID)" />
</table>
<table name="GIRecordDefault" uplink="(DesignID) = (DesignID)" />
<table name="GISort" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GITable" uplink="(DesignID) = (DesignID)">
<table name="GIRelation" uplink="(DesignID, Alias) = (DesignID, ParentTable)">
<table name="GIOn" uplink="(DesignID, LineNbr) = (DesignID, RelationNbr)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIResult" uplink="(Alias, DesignID) = (ObjectName, DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
<table name="GIResultKvExt" uplink="(NoteID) = (RecordID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="GIWhere" uplink="(DesignID) = (DesignID)">
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="SiteMap" uplink="(DesignID) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignById">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(Name) = (Url)" recursion="(NodeID) = (ParentID)" linkname="toDesignByName">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="SiteMap" uplink="(PrimaryScreenIDNew) = (ScreenID)" recursion="(NodeID) = (ParentID)" linkname="to1Screen">
<table name="ListEntryPoint" uplink="(ScreenID) = (ListScreenID)" />
<table name="MUIScreen" uplink="(NodeID) = (NodeID)">
<table name="MUIPinnedScreen" uplink="(NodeID, WorkspaceID) = (NodeID, WorkspaceID)" />
</table>
<table name="MUITile" uplink="(ScreenID) = (ScreenID)" />
</table>
<table name="Note" uplink="(NoteID) = (NoteID)" />
</table>
<table name="MUIWorkspace">
<table name="MUIFavoriteWorkspace" uplink="(WorkspaceID) = (WorkspaceID)" />
</table>
<table name="MUISubcategory" />
<table name="MUIArea" />
</layout>
<data>
<GIDesign>
<row DesignID="64910ad5-ae67-4fca-b791-058849f2814d" Name="TESTDATES" FilterColCount="3" PagerStyle="0" PageSize="0" NewRecordCreationEnabled="0" MassDeleteEnabled="0" AutoConfirmDelete="0" MassRecordsUpdateEnabled="0" MassActionsOnRecordsEnabled="0" ExposeViaOData="0">
<GIFilter LineNbr="1" IsActive="1" Name="DateFrom" FieldName="INTran.tranDate" DataType="string" DisplayName="From Date" IsExpression="1" DefaultValue="#WeekStart-1" ColSpan="1" Required="0" />
<GIFilter LineNbr="2" IsActive="1" Name="DateTo" FieldName="INTran.tranDate" DataType="string" DisplayName="To Date" IsExpression="1" DefaultValue="#WeekEnd-1" ColSpan="1" Required="0" />
<GISort LineNbr="1" IsActive="1" DataFieldName="INTran.tranDate" SortOrder="A" />
<GISort LineNbr="2" IsActive="1" DataFieldName="InventoryItem.inventoryCD" SortOrder="A" />
<GITable Alias="INTran" Name="PX.Objects.IN.INTran">
<GIRelation LineNbr="1" ChildTable="InventoryItem" IsActive="1" JoinType="I">
<GIOn LineNbr="1" ParentField="inventoryID" Condition="E " ChildField="inventoryID" Operation="A" />
</GIRelation>
<GIResult LineNbr="1" IsActive="1" Field="tranDate" SchemaField="INTran.TranDate" IsVisible="1" DefaultNav="1" RowID="0dcfd9ab-a8e9-4b47-9dbb-be31e37a0291" />
<GIResult LineNbr="2" IsActive="1" Field="tranType" SchemaField="INTran.TranType" IsVisible="1" DefaultNav="1" RowID="51d68bd5-e0d6-4d3a-8367-94260886de85" />
<GIResult LineNbr="4" IsActive="1" Field="qty" SchemaField="INTran.Qty" IsVisible="1" DefaultNav="1" RowID="cd4144b0-eef2-4266-9a1f-d6ee123e2445" />
<GIResult LineNbr="5" IsActive="1" Field="uOM" SchemaField="INTran.UOM" IsVisible="1" DefaultNav="1" RowID="df04268c-bded-4995-ab4a-97852c56f1be" />
</GITable>
<GITable Alias="InventoryItem" Name="PX.Objects.IN.InventoryItem">
<GIResult LineNbr="3" IsActive="1" Field="inventoryID" SchemaField="InventoryItem.InventoryID" IsVisible="1" DefaultNav="1" RowID="627befa9-e0f8-41ab-b09d-df56e2aca331" />
</GITable>
<GIWhere LineNbr="1" IsActive="1" OpenBrackets="( " DataFieldName="INTran.tranDate" Condition="B " IsExpression="0" Value1="[DateFrom]" Value2="[DateTo]" CloseBrackets=") " Operation="A" />
</row>
</GIDesign>
</data>
</data-set>

Related

Is it possible to create toc.js, frameset.html, frameset-nav.html, graphicMap.xml using xhtml base plugin

Is it possible to create the toc.js, frameset.html, frameset-nav.html, graphicMap.xml files dynamically as like html2 base plugin using custom plugin I have created, plugin creation explained in below link
custom plugin created
I have created the custom xhtml plugin like this
my plugin.xml code is
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Open Toolkit project.
See the accompanying license.txt file for applicable licenses.
-->
<plugin id="com.custom.xhtml">
<!-- extensions -->
<feature extension="dita.xsl.xhtml" file="xslhtml/map2xhtmtoc.xsl"/>
<feature extension="dita.xsl.xhtml" file="xslhtml/dita2xhtml.xsl"/>
<feature extension="dita.conductor.transtype.check" value="xhtml-custom" type="txt"/>
<feature extension="dita.conductor.target.relative" file="build.xml"/>
<!-- change value to match your custom transtype -->
</plugin>
build.xml code is
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.custom.xhtml">
<import file="build_transtype-custom.xml"/>
</project>
the build_transtype-custom.xml is
<project name="xhtml-custom" default="dita2xhtml-custom">
<property name="transtype" value="xhtml-custom"/>
<target name="dita2xhtml-custom">
<echo>custom HTML transform</echo>
<!-- Set properties here -->
<condition property="args.xhtml.toc.xsl" value="${dita.plugin.com.custom.xhtml.dir}/xslhtml/map2xhtmtoc.xsl">
<not>
<isset property="args.xhtml.toc.xsl"></isset>
</not>
</condition>
<condition property="args.xhtml.toc" value="index">
<not>
<isset property="args.xhtml.toc"></isset>
</not>
</condition>
<antcall target="dita2xhtml"/>
</target>
</project>
then I have pasted the base plugin xsl folder to customized plugin the I have changed the xsl named dita2xhtml.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="dita2html-base.xsl"/>
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<xsl:variable name="source-chars" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ .'"/>
<xsl:variable name="target-chars" select="'abcdefghijklmnopqrstuvwxyz__'"/>
<xsl:template match="task">
<div class="topic">
<xsl:attribute name="id">
<xsl:value-of select="attribute::id"/>
</xsl:attribute>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="task/title">
<h1>Chapter <xsl:number count="task"/>. <xsl:apply-templates/><xsl:text> </xsl:text><script type="text/javascript" language="JavaScript" src="find5.js"><xsl:text>​</xsl:text></script></h1>
</xsl:template>
<xsl:template match="section">
<div class="section" id="{translate(title, $source-chars, $target-chars )}">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="taskbody">
<div>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="title">
<h2 class="sectiontitle">
<xsl:apply-templates/>
</h2>
</xsl:template>
<xsl:template match="p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="steps">
<ol>
<xsl:apply-templates/>
</ol>
</xsl:template>
<xsl:template match="step">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="cmd">
<span>
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="b">
<strong>
<xsl:apply-templates/>
<xsl:text>​</xsl:text>
</strong>
</xsl:template>
<xsl:template match="menucascade">
<span class="menucascade">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="uicontrol">
<span class="uicontrol">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="filepath">
<span class="filepath">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="xref">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="info">
<div>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="i">
<em>
<xsl:apply-templates/>
</em>
</xsl:template>
<!-- Add both lang and xml:lang attributes -->
<xsl:template match="#xml:lang" name="generate-lang">
<xsl:param name="lang" select="."/>
<xsl:attribute name="xml:lang">
<xsl:value-of select="$lang"/>
</xsl:attribute>
<xsl:attribute name="lang">
<xsl:value-of select="$lang"/>
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
then changed the xsl named map2htmtocImpl.xsl template named as generate-toc in xslhtml\map2htmtoc folder as like this
template changes only done
<xsl:template name="generate-toc">
<html style="overflow-y:auto"><xsl:value-of select="$newline"/>
<head><xsl:value-of select="$newline"/><title>Configuring Workflow</title><xsl:value-of select="$newline"/>
<xsl:value-of select="$newline"/>
<xsl:call-template name="generateDefaultCopyright"/>
<xsl:call-template name="generateCharset"/>
<xsl:if test="string-length($contenttarget)>0 and
$contenttarget!='NONE'">
<base target="{$contenttarget}"/>
<xsl:value-of select="$newline"/>
</xsl:if>
<!-- initial meta information -->
<!-- Set the character set to UTF-8 -->
<!-- Generate a default copyright, if needed -->
<xsl:call-template name="generateDefaultMeta"/> <!-- Standard meta for security, robots, etc -->
<xsl:call-template name="copyright"/> <!-- Generate copyright, if specified manually -->
<xsl:call-template name="generateCssLinks"/> <!-- Generate links to CSS files -->
<xsl:call-template name="generateMapTitle"/> <!-- Generate the <title> element -->
<xsl:call-template name="gen-user-head" /> <!-- include user's XSL HEAD processing here -->
<xsl:call-template name="gen-user-scripts" /> <!-- include user's XSL javascripts here -->
<xsl:call-template name="gen-user-styles" /> <!-- include user's XSL style element and content here -->
</head><xsl:value-of select="$newline"/>
<body>
<xsl:if test="string-length($OUTPUTCLASS) > 0">
<xsl:attribute name="class">
<xsl:value-of select="$OUTPUTCLASS"/>
</xsl:attribute>
</xsl:if>
<xsl:value-of select="$newline"/>
<nav><xsl:value-of select="$newline"/>
<div xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" class="dynamic-toc"><xsl:value-of select="$newline"/>
<div id="container" ><xsl:value-of select="$newline"/>
<div id="containerTop"><xsl:value-of select="$newline"/>
<div id="main"><xsl:value-of select="$newline"/>
<div id="content"><xsl:value-of select="$newline"/>
<form name="mainForm" action="javscript:;"><xsl:value-of select="$newline"/>
<div class="newsItem"><xsl:value-of select="$newline"/>
<div id="expandcontractdiv"><xsl:value-of select="$newline"/>
Expand all<xsl:value-of select="$newline"/>
Collapse all<xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
<div id="treeDiv1"> </div><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
</form><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
</div><xsl:value-of select="$newline"/>
<xsl:apply-templates/>
</nav><xsl:value-of select="$newline"/>
<iframe class="contentwin" id="contentwin" name="contentwin" src="test.html"> 
</iframe><xsl:value-of select="$newline"/>
<div id="footer" class="footer"></div><xsl:value-of select="$newline"/>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="yahoo.js"> </script><xsl:value-of select="$newline"/>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="event.js"> </script><xsl:value-of select="$newline"/>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="treeview.js"> </script><xsl:value-of select="$newline"/>
</body><xsl:value-of select="$newline"/>
</html>
</xsl:template>
for the created plugin for the creation of toc.js, frameset.html, frameset-nav.html, graphicMap.xml files dynamically as like html2 by applying which commands i can create the files dynamically using my customized plugin.
shown below
toc.js as like
//
// Javascript generated by HTML2 Toolkit plugin
//
var tree;
function treeInit() {
tree = new YAHOO.widget.TreeView("treeDiv1");
var root = tree.getRoot();
var objd64e49 = {
label: " About This Book",
href: "topics/guide.html#about-this-book-install-guide",
target:"contentwin"
};
var d64e49 = new YAHOO.widget.TextNode(objd64e49, root, false);
var objd64e70 = {
label: " Notices",
href: "topics/5-install-guide.html#notices",
target:"contentwin"
};
var d64e70 = new YAHOO.widget.TextNode(objd64e70, root, false);
var objd64e95 = {
label: "Chapter 1. Flows",
href: "topics/guide.html#flows",
target:"contentwin"
};
var d64e95 = new YAHOO.widget.TextNode(objd64e95, root, false);
//for testing
var d64e163a = new YAHOO.widget.TextNode(objd64e163, root, false);
var d64e184a = new YAHOO.widget.TextNode(objd64e184, d64e163a, false);
var d64e205a = new YAHOO.widget.TextNode(objd64e205, d64e163a, false);
var d64e229a = new YAHOO.widget.TextNode(objd64e229, d64e163a, false);
var d64e163b = new YAHOO.widget.TextNode(objd64e163, root, false);
var d64e184b = new YAHOO.widget.TextNode(objd64e184, d64e163b, false);
var d64e205b = new YAHOO.widget.TextNode(objd64e205, d64e163b, false);
var d64e229b = new YAHOO.widget.TextNode(objd64e229, d64e163b, false);
var d64e163c = new YAHOO.widget.TextNode(objd64e163, root, false);
var d64e184c = new YAHOO.widget.TextNode(objd64e184, d64e163c, false);
var d64e205c = new YAHOO.widget.TextNode(objd64e205, d64e163c, false);
var d64e229c = new YAHOO.widget.TextNode(objd64e229, d64e163c, false);
var d64e163d = new YAHOO.widget.TextNode(objd64e163, root, false);
var d64e184d = new YAHOO.widget.TextNode(objd64e184, d64e163d, false);
var d64e205d = new YAHOO.widget.TextNode(objd64e205, d64e163d, false);
var d64e229d = new YAHOO.widget.TextNode(objd64e229, d64e163d, false);
tree.draw();
}
YAHOO.util.Event.addListener(window, "load", treeInit);
frameset.html as
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Flow</title>
<link rel="stylesheet" type="text/css" href="css/$csscommonltr.css">
</head>
<frameset cols="30%,*">
<frame name="tocwin" src="frameset-nav.html">
<frame name="contentwin" src="topics/guide.html">
</frameset>
</html>
frameset-nav.html as
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head><title>Flow</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<base target="contentwin"/>
<link rel="stylesheet" type="text/css" href="css/reset-html5.css"/>
<link rel="stylesheet" type="text/css" href="css/root-page.css"/>
<link rel="stylesheet" type="text/css" href="css/local/tree.css"/>
</head>
<body>
<div xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" class="dynamic-toc">
<div id="container">
<div id="containerTop">
<div id="main">
<div id="content">
<form name="mainForm" action="javscript:;">
<div class="newsItem">
<div id="expandcontractdiv">
Expand all
Collapse all
</div>
<div id="treeDiv1"> </div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="yahoo.js"> </script>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="event.js"> </script>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="treeview.js"> </script>
<script xmlns:glossdata="http://dita4publishers.org/glossdata" xmlns:mapdriven="http://dita4publishers.org/mapdriven" xmlns:enum="http://dita4publishers.org/enumerables" type="text/javascript" src="toc.js"> </script>
</body></html>
and the graphicMap.xml as like
<?xml version="1.0" encoding="UTF-8"?>
<gmap:graphic-map xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
xmlns:gmap="http://dita4publishers/namespaces/graphic-input-to-output-map">
<gmap:graphic-map-item id="image-list-item-1"
input-url="images/m4_Oct31.png"
output-url="file:/E:/task/out/xhtml-rsuite4docs/images/m4_Oct31.png"/>
<gmap:graphic-map-item id="image-list-item-2"
input-url="images/m2_Oct31.png"
output-url="file:/E:/task/out/xhtml-rsuite4docs/images/m2_Oct31.png"/>
</gmap:graphic-map>

How to do this in HTML / XSLT?

We're working on moving some reports from SSRS to XSLT / HTML, but I'm stuck on how to properly do the below. Basically, there are a lot of <itemid>'s and <location>'s, but I'm not sure how to loop through? My XML result looks similar to below:
<CombinedResults>
<Results>
<Result>
<itemid> GAC Test 2</itemid>
<displayname> GAC Test 2</displayname>
<salesdescription/>
<inventorylocation>4</inventorylocation>
<locationquantityavailable>10</locationquantityavailable>
<locationquantitybackordered/>
</Result>
<Result>
<itemid> GAC Test 2</itemid>
<displayname> GAC Test 2</displayname>
<salesdescription/>
<inventorylocation>2</inventorylocation>
<locationquantityavailable>180</locationquantityavailable>
<locationquantitybackordered/>
</Result>
</Results>
</CombinedResults>
My XSLT Looks like below, but only shows 1 item and 1 location, rather than showing the item for all locations:
<xsl:template match="/CombinedResults">
<html>
<head>
<link rel="stylesheet" type="text/css" href="SOMESTYLESHEET"/>
</head>
<body>
<table>
<tr>
<th>Item ID</th>
<th>Location Available</th>
</tr>
<tr>
<td><xsl:value-of select="Results/Result/itemid"/></td>
<td><xsl:value-of select="Results/Result/inventorylocation"/></td>
</tr>
</table>
</body>
</html>
</xsl:template>
I've also tried the below, which I think is close, but doesn't work:
<xsl:template match="/CombinedResults">
<html>
<head>
<!-- URL must have ampersands replaced with & -->
<link rel="stylesheet" type="text/css" href="SOMECSS"/>
</head>
<body>
<table>
<tr>
<th>Item ID</th>
<th>Location Available</th>
</tr>
<tr>
<!--
<td><xsl:value-of select="Results/Result/itemid"/></td>
<td><xsl:value-of select="Results/Result/inventorylocation"/></td>
-->
<xsl:for-each select="Results/Result/">
<td><xsl:value-of select="itemid"/></td>
</xsl:for-each>
</tr>
</table>
</body>
</html>
</xsl:template>
Any help is greatly appreciated!
Your exact requirements are a little vague, but here's my guess as to what you need.
Assuming this input:
<?xml version="1.0" encoding="UTF-8"?>
<CombinedResults>
<Results>
<Result>
<itemid> GAC Test 2</itemid>
<displayname> GAC Test 2</displayname>
<salesdescription/>
<inventorylocation>4</inventorylocation>
<locationquantityavailable>10</locationquantityavailable>
<locationquantitybackordered/>
</Result>
<Result>
<itemid> GAC Test 2</itemid>
<displayname> GAC Test 2</displayname>
<salesdescription/>
<inventorylocation>2</inventorylocation>
<locationquantityavailable>180</locationquantityavailable>
<locationquantitybackordered/>
</Result>
</Results>
</CombinedResults>
And this XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/CombinedResults">
<html>
<head>
<link rel="stylesheet" type="text/css" href="SOMESTYLESHEET"/>
</head>
<body>
<table>
<tr>
<th>Item ID</th>
<th>Location Available</th>
</tr>
</table>
<xsl:apply-templates select=".//Result"/>
</body>
</html>
</xsl:template>
<xsl:template match="Result">
<tr>
<td><xsl:value-of select="itemid"/></td>
<td><xsl:value-of select="inventorylocation"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
The output is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="SOMESTYLESHEET">
</head>
<body>
<table>
<tr>
<th>Item ID</th>
<th>Location Available</th>
</tr>
</table>
<tr>
<td> GAC Test 2</td>
<td>4</td>
</tr>
<tr>
<td> GAC Test 2</td>
<td>2</td>
</tr>
</body>
</html>

apply-templates outputs content more times than expected

I'm new to XSLT and I can't understand why the root get processed twice (at least this is my interpretation of this output).
EDIT: (I'm using Saxon-HE with XSLT 2.0) but also tested with several online processes, getting always the same result.
XSLT file
<?xml version="1.0" encoding="UTF-8"?>
<!-- XResume.xsl: resume.xml ==> resume.xhtml -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="https://github.com/IME-SE8/XResume">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<head>
<meta charset="utf-8" />
<meta lang="en" />
<meta name="description" content="Personal Resume and Portfolio" />
<title><xsl:value-of select="resume/personalInformation/name/attribute::shortForm" /> Website</title>
</head>
<body>
<xsl:apply-templates select="resume"/>
</body>
</html>
</xsl:template>
<xsl:template match="resume">
<div class="resume">
<div class="header">
<div class="name"><xsl:value-of select="personalInformation/name" /></div>
<div class="contacts">
<xsl:for-each select="personalInformation/contact">
<div class="contactInformation">
<p><xsl:value-of select="organization" /></p>
<p><xsl:value-of select="address" /></p>
<p><xsl:value-of select="phoneNumber" /></p>
<p><xsl:value-of select="email" /></p>
</div>
</xsl:for-each>
</div>
</div>
<div class="sections">
<xsl:apply-templates />
</div>
</div>
</xsl:template>
<xsl:template match="interests"></xsl:template>
<xsl:template match="education"></xsl:template>
<xsl:template match="skills"></xsl:template>
<xsl:template match="experiences"></xsl:template>
<xsl:template match="projects"></xsl:template>
<xsl:template match="awards"></xsl:template>
</xsl:stylesheet>
XML file
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl"
href="https://github.com/IME-SE8/XResume/master/XResume.xsl"?>
<resume
xmlns="https://github.com/IME-SE8/XResume"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/IME-SE8/XResume XResume.xsd">
<personalInformation>
<name first="John" last="Doe" shortForm="JD">John Doe</name>
<contact type="institutional">
<organization>StackOverflow Institute of Technology</organization>
<address>Internet</address>
<phoneNumber>+1 (666) 666-9999</phoneNumber>
<email>john#d.oe</email>
</contact>
</personalInformation>
<interests>
<interest>Q and A</interest>
<interest>XSLT</interest>
</interests>
<education></education>
<skills></skills>
<experiences></experiences>
<projects></projects>
<awards></awards>
</resume>
HTML output
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta lang="en">
<meta name="description" content="Personal Resume and Portfolio">
<title>JD Website</title>
</head>
<body>
<div class="resume">
<div class="header">
<div class="name">John Doe</div>
<div class="contacts">
<div class="contactInformation">
<p>StackOverflow Institute of Technology</p>
<p>Internet</p>
<p>+1 (666) 666-9999</p>
<p>john#d.oe</p>
</div>
</div>
</div>
<div class="sections">
John Doe
StackOverflow Institute of Technology
Internet
+1 (666) 666-9999
john#d.oe
</div>
</div>
</body>
</html>
(yes, with that amount of blank lines)
The output header div is perfectly fine, but inside the sections div that apply-templates renders all the information in the div header again but without the HTML tags.
Is there any XSLT processing detail am I missing? Does the template match sets the context in a way that the matched element is now considered a root or something like that?
The problem is here:
<div class="sections">
<xsl:apply-templates />
</div>
This applies templates to all child nodes of the current node (resume), including the personalInformation element.
As there is no matching template specified for personalInformation, the builtin XSLT templates are used by the XSLT processor and applying them results in outputting the concatenation of all descendent text-nodes of the personalInformation element.
Solution:
Replace:
<div class="sections">
<xsl:apply-templates />
</div>
with:
<div class="sections">
<xsl:apply-templates select="*[not(self::personalInformation)]" />
</div>
The result of the transformation now doesn't contain the noted problematic output:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta lang="en">
<meta name="description" content="Personal Resume and Portfolio">
<title>JD Website</title>
</head>
<body>
<div class="resume">
<div class="header">
<div class="name">John Doe</div>
<div class="contacts">
<div class="contactInformation">
<p>StackOverflow Institute of Technology</p>
<p>Internet</p>
<p>+1 (666) 666-9999</p>
<p>john#d.oe</p>
</div>
</div>
</div>
<div class="sections"></div>
</div>
</body>
</html>
You haven't supplied an expected output, so I will guess at your intended outcome. Here is an XSLT 2.0 solution. If you need XSLT 1.0, please comment, and I can add. But just remember that if your transform engine is the browser, you have no excuse not to use XSLT 2.0. (Refer Saxon CE).
XSLT 2.0 Solution
This XSLT 2.0 stylesheet ...
<xsl:transform
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:r="https://github.com/IME-SE8/XResume"
exclude-result-prefixes="r"
version="2.0">
<xsl:output method="html" version="5" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*" />
<xsl:template match="/">
<html>
<head>
<meta lang="en" />
<meta name="description" content="Personal Resume and Portfolio" />
<title><xsl:value-of select="r:resume/r:personalInformation/r:name/#shortForm" /> Website</title>
</head>
<body>
<xsl:apply-templates select="r:resume"/>
</body>
</html>
</xsl:template>
<xsl:template match="r:resume">
<div class="resume">
<div class="header">
<div class="name"><xsl:value-of select="r:personalInformation/r:name" /></div>
<div class="contacts">
<xsl:apply-templates select="r:personalInformation/r:contact" />
</div>
</div>
<div class="sections">
<xsl:apply-templates select="* except r:personalInformation" />
</div>
</div>
</xsl:template>
<xsl:template match="r:contact">
<div class="contactInformation">
<xsl:apply-templates />
</div>
</xsl:template>
<xsl:template match="r:organization|r:address|r:phoneNumber|r:email">
<p><xsl:value-of select="." /></p>
</xsl:template>
<xsl:template match="r:education|r:skills|r:experiences|r:projects|r:awards">
<h2><xsl:value-of select="local-name()" /></h2>
<p><xsl:value-of select="." /></p>
</xsl:template>
<xsl:template match="r:interests">
<h2>interests</h2>
<ul>
<xsl:apply-templates />
</ul>
</xsl:template>
<xsl:template match="r:interest">
<li>
<xsl:value-of select="." />
</li>
</xsl:template>
<xsl:template match="*" />
</xsl:transform>
... when applied to this input document ...
<resume
xmlns="https://github.com/IME-SE8/XResume"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/IME-SE8/XResume XResume.xsd">
<personalInformation>
<name first="John" last="Doe" shortForm="JD">John Doe</name>
<contact type="institutional">
<organization>StackOverflow Institute of Technology</organization>
<address>Internet</address>
<phoneNumber>+1 (666) 666-9999</phoneNumber>
<email>john#d.oe</email>
</contact>
</personalInformation>
<interests>
<interest>Q and A</interest>
<interest>XSLT</interest>
</interests>
<education></education>
<skills></skills>
<experiences></experiences>
<projects></projects>
<awards></awards>
</resume>
... will yield this output html page ....
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta lang="en">
<meta name="description" content="Personal Resume and Portfolio">
<title>JD Website</title>
</head>
<body>
<div class="resume">
<div class="header">
<div class="name">John Doe</div>
<div class="contacts">
<div class="contactInformation">
<p>StackOverflow Institute of Technology</p>
<p>Internet</p>
<p>+1 (666) 666-9999</p>
<p>john#d.oe</p>
</div>
</div>
</div>
<div class="sections">
<h2>interests</h2>
<ul>
<li>Q and A</li>
<li>XSLT</li>
</ul>
<h2>education</h2>
<p></p>
<h2>skills</h2>
<p></p>
<h2>experiences</h2>
<p></p>
<h2>projects</h2>
<p></p>
<h2>awards</h2>
<p></p>
</div>
</div>
</body>
</html>
Explanation: Why were you getting root processed twice
In short because your <div class="sections"><xsl:apply-templates /></div> instruction did not specify a select attribute. The default selection applied, which was at that point the document root.
All the elements in your source document are in a namespace, but your stylesheet is written to process elements in no namespace. Welcome to the club, and join the 10m other people who have fallen into this trap. Essentially, you resume elements don't match the match="resume" template, so the default template kicks in, and this outputs the raw text with no tags. For the solution, search on "XSLT default namespace" and choose any one of about 1000 answers.
On re-reading, I see that you've used xpath-default-namespace="https://github.com/IME-SE8/XResume", which should fix the problem if you are using an XSLT 2.0 processor, or trigger an error if you're using an XSLT 1.0 processor. So it might be useful (actually, it's always useful) to tell us what processor you are using and how you are running it.

XSLT if condition for no of nodes

I am relatively new to xslt ,I want to do something if the nodecount is not equal to 0,but XSLT not working for if condition
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="CSS.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main_cont">
<div class="page3">
<xsl:if test="(Count(/PrecisionVestor/OtherIncomeSection/OtherIncome) != 0)">
<div class="rent_roll">
<div class="othr_inc">
<div class="fst_r_box">
<div class="fst_r_box_fst_row" style="width:100%; height:30px; float:left;">
<div class="item" style="width:25%; height:30px; float:left; line-height:30px;">Description</div>
<div class="cost" style="width:18%; height:30px; float:left; text-align:center; line-height:30px;">Monthly Rent</div>
<div class="cost" style="width:18%; height:30px; float:left; text-align:center; line-height:30px;">Lease Start</div>
<div class="cost" style="width:18%; height:30px; float:left; text-align:center; line-height:30px;">Lease End</div>
<div class="cost" style="width:18%; height:30px; float:left; text-align:center; line-height:30px; ">Escalator</div>
</div>
<xsl:for-each select="PrecisionVestor/OtherIncomeSection/OtherIncome">
<div class="fst_r_box_fst_row_inn">
<div class="item_b" style="width:25%; "><xsl:value-of select="Description"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="MonthlyRent"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="LeaseStart"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="LeaseEnd"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="Escalator"/></div>
</div>
</xsl:for-each>
<xsl:for-each select="PrecisionVestor/OtherIncomeSection/TotalOtherIncome">
<div class="fst_r_box_btm_row">
<div class="item_b" style="width:25%; "><xsl:value-of select="Description"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="MonthlyRent"/></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"></div>
<div class="cost_b" style="width:12%; margin-right:6%; text-align:right; float:left;"><xsl:value-of select="Escalator"/></div>
</div>
</xsl:for-each>
</div>
</div>
</xsl:if>
</div>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Here is the xml for xslt
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xslStyle1.xsl"?>
<PrecisionVestor>
<OtherIncomeSection>
<OtherIncome>
<Description>Rent</Description>
<MonthlyRent>200</MonthlyRent>
<LeaseStart>3/12/13</LeaseStart>
<LeaseEnd>3/12/14</LeaseEnd>
<Escalator>2</Escalator>
</OtherIncome>
<TotalOtherIncome>
<Description>Totals</Description>
<MonthlyRent>200</MonthlyRent>
<Escalator>2</Escalator>
</TotalOtherIncome>
</OtherIncomeSection>
</PrecisionVestor>
It is working fine until I added if condition once I add the if condition I am getting blank html
One problem is that you are using a capital C in Count when it should be:
<xsl:if test="count(/PrecisionVestor/OtherIncomeSection/OtherIncome) != 0">
But count() is not actually needed to check for node presence. You can instead simply do this:
<xsl:if test="/PrecisionVestor/OtherIncomeSection/OtherIncome">
Another problem that is causing the XSLT to fail is that you are missing a closing </div> tag before the <xsl:if> tag. If both of these issues are fixed, the XSLT should run.
I'd also suggest tidying the XSLT up a bit, like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link href="CSS.css" rel="stylesheet" type="text/css" />
<style>
.item, .item_b { width: 25%; }
.item, .cost { height: 30px; float:left; line-height: 30px; }
.cost { width: 18%; text-align: center; }
.cost_b { width: 12%; margin-right: 6%; text-align: right; float: left; }
</style>
</head>
<body>
<div class="main_cont">
<div class="page3">
<xsl:apply-templates select="PrecisionVestor/OtherIncomeSection[OtherIncome]" />
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="OtherIncomeSection">
<div class="rent_roll">
<div class="othr_inc">
<div class="fst_r_box">
<div class="fst_r_box_fst_row" style="width:100%; height:30px; float:left;">
<div class="item">Description</div>
<div class="cost">Monthly Rent</div>
<div class="cost">Lease Start</div>
<div class="cost">Lease End</div>
<div class="cost">Escalator</div>
</div>
<xsl:apply-templates select="OtherIncome">
<xsl:with-param name="rowClass" select="'fst_r_box_fst_row_inn'" />
</xsl:apply-templates>
<xsl:apply-templates select="OtherIncome">
<xsl:with-param name="rowClass" select="'fst_r_box_btm_row'" />
</xsl:apply-templates>
</div>
</div>
</div>
</xsl:template>
<xsl:template match="OtherIncome | TotalOtherIncome">
<xsl:param name="rowClass" />
<div class="$rowClass">
<xsl:apply-templates select="Description | MonthlyRent" />
<xsl:apply-templates select="LeaseStart | LeaseEnd" />
<xsl:apply-templates select="self::TotalOtherIncome" mode="leaseColumns" />
<xsl:apply-templates select="Escalator" />
</div>
</xsl:template>
<xsl:template match="Description">
<div class="item_b">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="MonthlyRent | LeaseStart | LeaseEnd | Escalator">
<div class="cost_b">
<xsl:value-of select="."/>
</div>
</xsl:template>
<xsl:template match="TotalOtherIncome" mode="leaseColumns">
<div class="cost_b"></div>
<div class="cost_b"></div>
</xsl:template>
</xsl:stylesheet>

Why my XML file with style sheet(XSL) can't be displayed first time loaded?

The XML file with stylesheet (XSL) can be viewed at:
http://cistrome.org/cisapi/get/d2?id=2693
The problem is: In my browser(Firefox16), usually I need to refresh the page to see the whole page. Otherwise, I can only see a blank page without anything..
Does anyone have ideas about this? Thanks!
Input document
<?xml-stylesheet type="text/xsl" href="/cisapi_static/dataset2.xsl" ?>
<dataset>
<id>2693</id>
<treatment>
<sample id="2112" mode="verbose">
<factor>GATA2</factor>
<datasetID>2693</datasetID>
</cellLine>
<cellType>Megakaryocytes</cellType>
<cellPop>CD34+</cellPop>
<species>Homo sapiens</species>
<tissue>Bone Marrow</tissue>
<diseaseState>Normal</diseaseState>
</condition>
<paper>Genome-wide analysis of simultaneous GATA1/2, RUNX1, FLI1, and SCL binding in megakaryocytes identifies hematopoietic regulators.</paper>
<pmid>21571218</pmid>
<authors>Tijssen MR,Cvejic A,Joshi A,Hannah RL,Ferreira R,Forrai A,Bellissimo DC,Oram SH,Smethurst PA,Wilson NK,Wang X,Ottersbach K,Stemple DL,Green AR,Ouwehand WH,Göttgens B</authors>
<uniqueID>GSM607950</uniqueID>
<url>ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX029/SRX029434</url>
</sample>
</treatment>
<control>
<sample id="2951" mode="verbose">
<factor>IgG</factor>
</datasetID>
</cellLine>
<cellType>Megakaryocytes</cellType>
<cellPop>CD34+</cellPop>
<species>Homo sapiens</species>
<tissue>Bone Marrow</tissue>
<diseaseState>Normal</diseaseState>
</condition>
<paper>Genome-wide analysis of simultaneous GATA1/2, RUNX1, FLI1, and SCL binding in megakaryocytes identifies hematopoietic regulators.</paper>
<pmid>21571218</pmid>
<authors>Tijssen MR,Cvejic A,Joshi A,Hannah RL,Ferreira R,Forrai A,Bellissimo DC,Oram SH,Smethurst PA,Wilson NK,Wang X,Ottersbach K,Stemple DL,Green AR,Ouwehand WH,Göttgens B</authors>
<uniqueID>GSM607954</uniqueID>
<url>ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByExp/sra/SRX/SRX029/SRX029438</url>
</sample>
</control>
</dataset>
Stylesheet
<!-- Edited with XML Spy v2007 (http://www.altova.com) -->
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<body style="font-family:Arial,helvetica,sans-serif;font-size:12pt; background-color:#EEEEEE">
<div style="background-color:#FFFFF;color:black;padding:4px;text-align: center;">
<b>Dataset </b select="dataset/id">
</div>
<xsl:for-each select="dataset/treatment/sample">
<div style="background-color:#D8E3F9;color:black;padding:4px">
<span style="font-weight:bold;color:black"> Sample <xsl:value-of select="#id" />: </span>
<xsl:value-of select="factor" />
</div>
<div style="background-color:#FFFFF;color:black;padding:20px">
Uniqueid: <br select="uniqueID" />
Factor: <br select="factor" />
CellLine: <br select="cellLine" />
Celltype: <br select="cellType" />
Cellpop: <br select="cellPop" />
Species: <br select="species" />
Tissue: <br select="tissue" />
Diseasestate: <br select="diseaseState" />
Condition: </div select="condition">
<div style="background-color:#FFFFF;color:black;padding:20px">
Paper: <br select="paper" />
Pmid: <br select="pmid" />
Authors: <br select="authors" />
Url: </div select="url">
<br />
</xsl:for-each>
<xsl:for-each select="dataset/control/sample">
<div style="background-color:#86ABA5;color:black;padding:4px">
<span style="font-weight:bold;color:black"> Sample <xsl:value-of select="#id" />: </span>
<xsl:value-of select="factor" />
</div>
<div style="background-color:#FFFFF;color:black;padding:20px">
Uniqueid: <br select="uniqueID" />
Factor: <br select="factor" />
CellLine: <br select="cellLine" />
Celltype: <br select="cellType" />
Cellpop: <br select="cellPop" />
Species: <br select="species" />
Tissue: <br select="tissue" />
Diseasestate: <br select="diseaseState" />
Condition: </div select="condition">
<div style="background-color:#FFFFF;color:black;padding:20px">
Paper: <br select="paper" />
Pmid: <br select="pmid" />
Authors: <br select="authors" />
Url: </div select="url">
<br />
</xsl:for-each>
</body>
</html>
Given the OP's comment, try: Using <meta> tags to turn off caching in all browsers?
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
Insert these into the head.