ok this is the last question pertaning to this example. I am trying to get the approval number that corresponds to the loan amount of 1000. From the previous help I have recieved here I am trying to use this syntax:
<xsl:template match="Applications">
<p>
<xsl:value-of...
Jumped ahead of myself again. I was able to figure out how to do names, loan amounts and addresses. Still can not figure out how to output the loan amounts and terms in a good format though. I do not know much html.
that tutorial is what I have been looking at for examples. The SAMS book does not seem to have alot of tutorials in it or examples to follow. I have managed to output the loan amount and the interest rate. However, I would like to format it so I can <xml:text>Loan Amount: </xml:text> and then...
OK last question, I swear. How do you select loan amount and interest for each approval? I can select and output all the loan amounts and then all the interest, but not the loan amount then interest, loan amount, interest, etc.
This is what I have now in order to output all the approval numbers:
<xsl:template match="document">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="Applications">
<p>
<xsl:value-of select="//Approvals/@approvalNumber"/>
</p>...
thanks, adding that last template match got rid of the rest of the text except the numbers. What if I wanted to select just the approval numbers? replacing //loanAmount with //@approvalNumber does not seem to work. Would I have to use a for-each to catch all the approval Numbers? Thanks again...
also, I am still getting other data such as the comment and address listed as well instead of just the loan. What is causing this to be listed as I am only outputting the loan?
when I use the following syntax, it lists one number and not all of them. Does the xpath expression need to be used elsewhere in order to pick up all of the numbers?
<xsl:template match="document">
<html>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>...
Thanks for helping me through all this xpath guys. I am slowly getting it. I now have a doc that is a little different from those that I have been working with. It looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xmp:document
xmlns:xmp="http://www.example.org"...
solution 1 worked. Let me see if I understand whats happening though. It is saying select all the name, look through all the child nodes (is that what the ::* is for) to find node features then feature whos thext is equal to Remote?
It is still not outputting correctly. Is this correct?
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="storess">
<html>...
I am working on xpath and have some questions. I have the following document:
<?xml version='1.0'?>
<stores>
<store name='Red'>
<computers>
<computer>Dell</computer>
</cpmputers>
</store>
<store name='Green'>
<computers>
</computers>
<features>...
thanks. That worked like a charm. I will be trying to work some more with xpath later so I am sure I will have some more questions for you guys. thanks for all of the help so far.
so something like:
<xsl:for-each select="equipmentList">
<xsl:for-each select="equipment">
<xsl:value-of select="equipment"/>
</xsl:for-each>
</xsl:for-each>
Is that correct?
I have an xml document like the one below:
<room name='Green'>
<equipmentList>
</equipmentList>
</room>
<room name='White'>
<equipmentList>
<equipment>Projector</equipment>
<equipment>PC</equipment>
<equipment>Mac</equipment>
</equipmentList>
</room>
<room...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.