I am getting the following error:
'import' element children must precede all other children of the 'stylesheet' element.
I am new to XML/XSLT and am unsure what is wrong. Any help would be greatly appreciated.
Swi
'import' element children must precede all other children of the 'stylesheet' element.
I am new to XML/XSLT and am unsure what is wrong. Any help would be greatly appreciated.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:date="[URL unfurl="true"]http://exslt.org/dates-and-times"[/URL] extension-element-prefixes="date">
<xsl:import href="date.xsl" />
<xsl:output method="html"/>
<xsl:template match="/">
<script src="/prinergyweb/custom/JobInfoSheet/Examples/Default/include/incDefaultJobInfoSheetJavaScript.js">
</script>
<table border="0" bordercolor="#00FF00" width="20%" celllpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="left" valign="middle" nowrap="true">
<u>
<b>General Information:</b>
</u>
</td>
</tr>
<tr height="5">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Newsletter Name:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="NewsletterName">
<input type="text" size="50" class="baseSans CSWStyle_InputColor" style="text-align:left">
<xsl:attribute name="value">
<xsl:value-of select="." />
</xsl:attribute>
</input>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="5">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Quantity:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="Quantity">
<input type="text" size="50" class="baseSans CSWStyle_InputColor" style="text-align:left">
<xsl:attribute name="value">
<xsl:value-of select="." />
</xsl:attribute>
</input>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="25">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Paper:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="Paper">
<select size="0" class="baseSans CSWStyle_DropDownColor">
<option value="">
<xsl:if test=".=''">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
</option>
<option value="White">
<xsl:if test=".='White'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
White
</option>
<option value="Cream">
<xsl:if test=".='Cream'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
Cream
</option>
<option value="Pumice">
<xsl:if test=".='Pumice'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
Pumice
</option>
<option value="Gypsum">
<xsl:if test=".='Gypsum'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
Gypsum
</option>
<option value="Whitestone">
<xsl:if test=".='Whitestone'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
Gypsum
</option>
</select>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="25">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Fold:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="Fold">
<select size="0" class="baseSans CSWStyle_DropDownColor">
<option value="">
<xsl:if test=".=''">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
</option>
<option value="8.5x11">
<xsl:if test=".='8.5x11'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
8.5x11
</option>
<option value="5.5x8.5">
<xsl:if test=".='5.5x8.5'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
5.5x8.5
</option>
<option value="#10">
<xsl:if test=".='#10'">
<xsl:attribute name="selected">1</xsl:attribute>
</xsl:if>
#10
</option>
</select>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<table border="0" bordercolor="#00FF00" width="30%" celllpadding="0" cellspacing="0">
<tr height="5">
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="biggerSansBold">
Bleed:
</span>
</td>
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="baseSans" style="position:relative; top:-3">yes</span>
<xsl:for-each select="JobSpec">
<xsl:for-each select="BleedOpt">
<xsl:for-each select="@Bleed">
<input type="radio">
<xsl:choose>
<xsl:when test=".='yes'">
<xsl:attribute name="checked">1</xsl:attribute>
<xsl:attribute name="value">yes</xsl:attribute>
</xsl:when>
<xsl:when test=".='no'">
<xsl:attribute name="value">yes</xsl:attribute>
</xsl:when>
</xsl:choose>
</input>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</td>
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="baseSans" style="position:relative; top:-3">
no
</span>
<xsl:for-each select="JobSpec">
<xsl:for-each select="BleedOpt">
<xsl:for-each select="@Bleed">
<input type="radio">
<xsl:choose>
<xsl:when test=".='no'">
<xsl:attribute name="checked">1</xsl:attribute>
<xsl:attribute name="value">no</xsl:attribute>
</xsl:when>
<xsl:when test=".='yes'">
<xsl:attribute name="value">no</xsl:attribute>
</xsl:when>
</xsl:choose>
</input>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="5">
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="biggerSansBold">
Mailing Service:
</span>
</td>
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="baseSans" style="position:relative; top:-3">yes</span>
<xsl:for-each select="JobSpec">
<xsl:for-each select="MailingServiceOpt">
<xsl:for-each select="@MailingService">
<input type="radio">
<xsl:choose>
<xsl:when test=".='yes'">
<xsl:attribute name="checked">1</xsl:attribute>
<xsl:attribute name="value">yes</xsl:attribute>
</xsl:when>
<xsl:when test=".='no'">
<xsl:attribute name="value">yes</xsl:attribute>
</xsl:when>
</xsl:choose>
</input>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</td>
<td align="left" valign="middle" nowrap="true" style="padding-left:10">
<span class="baseSans" style="position:relative; top:-3">
no
</span>
<xsl:for-each select="JobSpec">
<xsl:for-each select="MailingServiceOpt">
<xsl:for-each select="@MailingService">
<input type="radio">
<xsl:choose>
<xsl:when test=".='no'">
<xsl:attribute name="checked">1</xsl:attribute>
<xsl:attribute name="value">no</xsl:attribute>
</xsl:when>
<xsl:when test=".='yes'">
<xsl:attribute name="value">no</xsl:attribute>
</xsl:when>
</xsl:choose>
</input>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
</table>
<table border="0" bordercolor="#00FF00" width="100%" celllpadding="0" cellspacing="0">
<tr height="10">
<td style="padding-top:0.2cm;">
<span class="biggerSansBold">   Shipping Address:</span>
</td>
<td style="padding-top:0.2cm;">
<span class="biggerSansBold">   Additional Shipping Address:</span>
</td>
</tr>
<tr>
<td style="padding-bottom:0.3cm; padding-left:0.35cm;">
<xsl:for-each select="JobSpec">
<xsl:for-each select="ShippingAddress">
<textarea class="baseSans CSWStyle_InputColor" style="height:50; width:300; " value="">
<xsl:value-of select="." />
</textarea>
</xsl:for-each>
</xsl:for-each>
</td>
<td style="padding-bottom:0.3cm; padding-left:0.35cm;">
<xsl:for-each select="JobSpec">
<xsl:for-each select="AdditionalShippingAddress">
<textarea class="baseSans CSWStyle_InputColor" style="height:50; width:300; " value="">
<xsl:value-of select="." />
</textarea>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
</table>
<table border="0" bordercolor="#00FF00" width="100%" celllpadding="0" cellspacing="0">
<tr height="10">
<td style="padding-top:0.2cm;">
<span class="biggerSansBold">   Special Instructions:</span>
</td>
</tr>
<tr>
<td style="padding-bottom:0.3cm; padding-left:0.35cm;">
<xsl:for-each select="JobSpec">
<xsl:for-each select="SpecialInstructions">
<textarea class="baseSans CSWStyle_InputColor" style="height:50; width:500; " value="">
<xsl:value-of select="." />
</textarea>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
</table>
<table border="0" bordercolor="#00FF00" width="75%" celllpadding="0" cellspacing="0">
<tr height="5">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">WM Order#:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="WMOrder">
<input type="text" size="50" class="baseSans CSWStyle_InputColor" style="text-align:left">
<xsl:attribute name="value">
<xsl:value-of select="." />
</xsl:attribute>
</input>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="5">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Due Date:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="DueDate">
<input type="text" size="25" class="baseSans CSWStyle_InputColor" style="text-align:left">
<xsl:attribute name="value">
<xsl:value-of select="." />
</xsl:attribute>
</input>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
<tr height="5">
<td nowrap="true" style="padding-left:10">
<span class="biggerSansBold">Date/Time Stamp:</span>
</td>
<td align="left" style="padding-left:10">
<xsl:for-each select="JobSpec">
<xsl:for-each select="DateTimeStamp">
<input type="text" size="25" class="baseSans CSWStyle_InputColor" style="text-align:left" disabled="true">
<xsl:attribute name="value">
<xsl:value-of select="date:date-time()" />
</xsl:attribute>
</input>
</xsl:for-each>
</xsl:for-each>
</td>
</tr>
</table>
</tbody>
</table>
</xsl:template>
</xsl:stylesheet>
Swi