...I have recieved here I am trying to use this syntax:
<xsl:template match="Applications">
<p>
<xsl:value-of select="@approvalNumber[parent::*/loanAmount/text()='1000']"/>
</p>
</xsl:template>
However it does not output anything. Is this because the parent, Approvals, it not being...
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.
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.
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.