|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
XSL Help...URGENT ! Pls help
I am using following code to read from a xml document which is located in the same folder as this xsl file. This gives an error. Can you tell me whats wrong with this ?
<xsl:for-each select="document('cc_ins_entitle_customer_scroller.xml')/Customers/Customer"> ..... <td class="readonly_grid_cell" width="130" id="CustName" name="cust" onclick="showItem(this.innerText)"> <xsl:value-of select="Name"/> </td> ..... </xsl:for-each> the xml file content is: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="cc_ins_entitle_customer_scroller.xsl"?> <Customers> <Customer> <Name>C1</Name><Address>100 Mayland Dr</Address> <City>Horsham</City> <Zip>01110</Zip> <State>PA</State> <Phone>2126279172</Phone> <Item> <Class>101</Class> <Brand>SON</Brand> <Model>TV2356</Model> <Purchase>1/1/1995</Purchase> <Warranty>ESP</Warranty> <ContractNo>101</ContractNo> </Item> </Customer> <Customer> <Name>C2</Name><Address>240 Horsham Rd</Address> <City>Horsham</City> <Zip>11111</Zip> <State>VA</State> <Phone>2126279172</Phone> <Item> <Class>201</Class> <Brand>RCA</Brand> <Model>RD2356</Model> <Purchase>1/1/1997</Purchase> <Warranty>MFG</Warranty> <ContractNo>201</ContractNo> </Item> </Customer> </Customers> |
|
#2
|
|||
|
|||
|
Quote:
I think this is the problem. Try Code:
<xsl:for-each select="Customers/Customer"> |
|
#3
|
|||
|
|||
|
This did not work.
However, <xsl:for-each select="root/row"> works fine. So I am assuming it is trying to read from some other XML document. How do I make it read from MY XML document ? |
|
#4
|
|||
|
|||
|
So, it doesn't? Can you attach the files, so I can have a deep look at it? And also tell me how should it work.
|
|
#5
|
|||
|
|||
|
attachment
attached are the xsl and xml files.
Find "cc_ins_entitle_customer_scroller" in the xsl file. Thats the code I am having problems with. <xsl:for-each select="Customers/Customer"> does not work here. |
|
#6
|
||||
|
||||
|
ssrini03
Please read "How to post a question!" (link in sig) before posting again. Your thread subject needs to describe your problem. You are in the XSL forum, we know you need XSL help. Also, please place code in tags so it's easier for everybody to read.
__________________
# Jeremy Explain your problem instead of asking how to do what you decided was the solution. |
|
#7
|
|||
|
|||
|
ssrini03, sorry I have so much of my time occupied by my current task, so I can not do this. I am very sorry for the inconvenience. But I do have tried your XML and XSL, and I have something in mind. Perhaps:
Code:
<xsl:for-each select="ancestor:Customers/Customer"> would do something, but I am not very sure about it. And now I have to go back to my task. I am very sorry. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSL Help...URGENT ! Pls help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|