Hi Guys,
Howzit going?
I'm having trouble with an XSL file that I'm trying to code.
Is there a way that one could read url parameter variables into an xsl file?
This is what I have tried:
ASP File which links to XML file.
xmlReadDocument = strPath & "/inbox/" & CStr(serviceRef) & ".xml?sRef=" & serviceRef
response.redirect(xmlReadDocument)
XML file:
<?xml version="1.0"?>
<?xml-stylesheet href="WAstylesheet.xsl" type="text/xsl"?>
<order no="0002">
<Sender>Karim Abdul Jabbar</Sender>
<orderNo>5005</orderNo>
<orderDate>2002/01/22</orderDate>
<orderPoint>6004930005005</orderPoint>
<invoicePoint>6004930001575</invoicePoint>
<supplierPoint>6004931241000</supplierPoint>
<deliveryDates>
<earliest>2002/01/22</earliest>
<latest>2002/01/31</latest>
</deliveryDates>
<transactionCode>Transaction Code </transactionCode>
<narrative>Order Narrative 1</narrative>
<narrative>Order Narrative 2</narrative>
<narrative>Order Narrative 3</narrative>
<Product id="555-000004">
<Prod_Code>555-000004</Prod_Code>
<Colour>Blue</Colour>
<Qty_Ordered>4</Qty_Ordered>
<Size>Large</Size>
<Price>R40.00</Price>
<sellPrice>R46.00</sellPrice>
<prTotal>R160.00</prTotal>
</Product>
<orTotal>210</orTotal>
</order>
XSL File
<xsl:script language="VBScript">
<![CDATA[
function sref()
sref= CStr(request.querystring("sRef")
end function
]]>
</xsl:script>
In the code above(XSL), note that I'm trying to use VBScript's 'request' object. This however doesn't seem to be supported by XML/XSL, cause I get the following error:
Microsoft VBScript runtime error Object required: 'request' line = 3, col = 2 (line is offset from the start of the script block). Error returned from property or method call.
Any input would be greatly appreciated.
thanks
Howzit going?
I'm having trouble with an XSL file that I'm trying to code.
Is there a way that one could read url parameter variables into an xsl file?
This is what I have tried:
ASP File which links to XML file.
xmlReadDocument = strPath & "/inbox/" & CStr(serviceRef) & ".xml?sRef=" & serviceRef
response.redirect(xmlReadDocument)
XML file:
<?xml version="1.0"?>
<?xml-stylesheet href="WAstylesheet.xsl" type="text/xsl"?>
<order no="0002">
<Sender>Karim Abdul Jabbar</Sender>
<orderNo>5005</orderNo>
<orderDate>2002/01/22</orderDate>
<orderPoint>6004930005005</orderPoint>
<invoicePoint>6004930001575</invoicePoint>
<supplierPoint>6004931241000</supplierPoint>
<deliveryDates>
<earliest>2002/01/22</earliest>
<latest>2002/01/31</latest>
</deliveryDates>
<transactionCode>Transaction Code </transactionCode>
<narrative>Order Narrative 1</narrative>
<narrative>Order Narrative 2</narrative>
<narrative>Order Narrative 3</narrative>
<Product id="555-000004">
<Prod_Code>555-000004</Prod_Code>
<Colour>Blue</Colour>
<Qty_Ordered>4</Qty_Ordered>
<Size>Large</Size>
<Price>R40.00</Price>
<sellPrice>R46.00</sellPrice>
<prTotal>R160.00</prTotal>
</Product>
<orTotal>210</orTotal>
</order>
XSL File
<xsl:script language="VBScript">
<![CDATA[
function sref()
sref= CStr(request.querystring("sRef")
end function
]]>
</xsl:script>
In the code above(XSL), note that I'm trying to use VBScript's 'request' object. This however doesn't seem to be supported by XML/XSL, cause I get the following error:
Microsoft VBScript runtime error Object required: 'request' line = 3, col = 2 (line is offset from the start of the script block). Error returned from property or method call.
Any input would be greatly appreciated.
thanks