on 08-25-2010 3:22 PM
Hi ,
I am trying to display the XML data in a table using the XSLT .. In my XML i have 92 rows,,but in display i can see only 60 values.
I need to display the whole (2 values in my display.The xMII version is 12.0
Thanks in advance.
Check for following things
1) Row Count of individual queries used in BLS
2) Rows returned by BLS
3) Row Count of Xacute Query
4) Check if your XSLT has "for-each" and it will iterate how many items?
If this does not solve your purpose plz share the XSLT.
Regards,
Shalaka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
/script>
</head>
<body>
<form name="frm">
<table border="1" bordercolor="black" id="table" width="100%" height= " 100%">
<tr bgcolor="#B4CFEC">
<th><font face="SansSerif" size="2">Batch</font></th>
<th><font face="SansSerif" size="2">Location</font></th>
<th><font face="SansSerif" size="2">Available Qty</font></th>
<th><font face="SansSerif" size="2">Consume Qty</font></th>
<th><font face="SansSerif" size="2">UOM</font></th>
</tr>
<xsl:apply-templates/>
</table>
</form>
</body>
</html>
</xsl:template>
<xsl:template match="Row">
<tr>
<xsl:if test="(position() mod 2 = 1)">
<xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
</xsl:if>
<xsl:if test="(position() mod 2 = 0)">
<xsl:attribute name="bgcolor">#FFFFFF</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</tr>
</xsl:template>
</xsl:stylesheet>
<xsl:template match="Batch">
<td align="center" height="3" class="Column" width="70">
<input type="hidden" name="Batch">
<xsl:attribute name="value">
<xsl:apply-templates/>
</xsl:attribute>
</input>
<xsl:apply-templates/>
</td>
</xsl:template>
In the template match like batch i have materila ,location ,qty uom ,,etc ,and in the script i have one function for getting teh qty when double clicking
function getQuanValue()
{
var Quantity = document.frm.Quantity;
if (!document.getElementsByTagName || !document.createTextNode) return;
var rows = document.getElementById('table').getElementsByTagName('tbody')[0].getElementsByTagName('tr');
if(rows.length ==2)
{
QuantityRow= Quantity.value;
document.frm.txt1.value=QuantityRow;
}
else
{
var i;
for (i = 0; i < rows.length; i++)
{
rows<i>.ondblclick = function()
{
i = this.rowIndex - 1;
QuantityRow= Quantity<i>.value;
document.frm.txt1<i>.value=QuantityRow;
}
}
}
}
Hi Varsha,
In your code please try to replace "<xsl:apply-templates/>" with "<xsl:value-of select="."/>" after <xsl:attribute name="value"> and check whether u are getting requried answer or not
<xsl:template match="Batch">
<td align="center" height="3" class="Column" width="70">
<input type="hidden" name="Batch">
<xsl:attribute name="value">
<xsl:value-of select="."/>
</xsl:attribute>
</input>
<xsl:apply-templates/>
</td>
</xsl:template>
Varsha,
with Jeremy's reply in mind, have you checked
- query result is more than 60 rows ? (I think yes, I saw your confirmation above)
- the xacute result? Have you tested it in the workbench and does it display the same result as the query?
- the call to the URL with the xacute and xslt in a separate window (not an iFrame)?
If the first two options are ok, then the URl / XSLT call seems to cause the problem.
If you can't find the problem in the XSLT, you may try it step by step. Create a tiny new xslt which can be called via URL just like the original one, and which does not output a table structure, but just outputs the batches as text. Do not use the script, just output the text and check if all the batches are displayed (92 I guess from your previous posts).
If successful, try adding more functionality, e.g. using tables like in your original xslt.
Divide the implementation in smaller steps and check continously if the result is ok, so you may detect where it's going wrong.
Michael
HI ,,
I am using a transaction to get the XML and using the XSLT for displaying the values .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As per my understanding there will be two query one is inside your transaction to generate xml and another is your execute query so check rowcount for both queries.
In SQL and execute query rowcount is 100 by default and in Tag query rowcount is 60 by default.
One more thing i can suggest for troubleshooting.
You can trace your xml and check on your pc (Outside of MII) with xsl and see the results.
Regards,
Manoj Bilthare
Hi
I am using the Xacute query and the row count specified is 100. When i excuted the query with some inputs i can see more than 60 value ,
i have also placed the appelt code which is used to call ny query and xslt.
document.getElementById("frame").src ="/XMII/Illuminator?Server=XacuteConnector&Mode=Query&Transaction=HEM-MES/Consume/Consume_Available_Batches&OutputParameter=*&MappedParamTarget.1=Material&Param.1="Material"&MappedParamTarget.2=Quantity&Param.2="Quantity"&MappedParamTarget.3=ProcessOrder&Param.3="ProcessOrder"&MappedParamTarget.4=ReservationNo&Param.4="ReservationNo"&MappedParamTarget.5=ReservationItem&Param.5="ReservationItem"&MappedParamTarget.6=UOM&Param.6="UOM"&Content-Type=text/xml&StyleSheet=/XMII/CM/HEM-MES/Consume/Consume_Batch_Details.xsl" ;
pls help
Hi
You can add as one of URL param like &RowCount="100" in anywhere in the URL provided as below
document.getElementById("frame").src ="/XMII/Illuminator?Server=XacuteConnector&Mode=Query&Transaction=HEM-MES/Consume/Consume_Available_Batches&OutputParameter=*&MappedParamTarget.1=Material&Param.1="Material"&MappedParamTarget.2=Quantity&Param.2="Quantity"&MappedParamTarget.3=ProcessOrder&Param.3="ProcessOrder"&MappedParamTarget.4=ReservationNo&Param.4="ReservationNo"&MappedParamTarget.5=ReservationItem&Param.5="ReservationItem"&MappedParamTarget.6=UOM&Param.6="UOM"&RowCount="100"&Content-Type=text/xml&StyleSheet=/XMII/CM/HEM-MES/Consume/Consume_Batch_Details.xsl";
Regards
Som
To troubleshoot this issue you need to start from the inside and work your way to the outside. Start with the query template(s) included in your transaction, then check the XacuteQuery test, followed by the URL call using the xslt. Test and confirm the rowcount results at each step along the way.
Hi,
have you tried to use the code Markup described on the right side of the Message Edit window (the word "code" enclosed in curly brackets)? Placing the code between the two markups should work.
As there are a lot of possible errors have been mentioned in this thread and you are still facing the problem, it might help to see the xlst code.
Michael
Hi Varsha,
please share some more details with us.
For example, are you using a transaction that produces a XML and then use the XSLT transformation action? Or do you use XSLT with a SERVLET in the web page?
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.