- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
25 Posted Topics
You have hard-coded the image value to be book.gif. Change [code] <td><img src="book.gif"></img></td> [/code] to [code] <td><img src="{picture}"></img></td> [/code]
Try the below if you want the first IP address [code] /IPAddses/IPAddss[1]/addss [/code] [1] means the position of <IPAddss>. If you want to fetch the address depending upon <ix> then try the following [code] /IPAddses/IPAddss[ix = '0']/addss [/code]
I'm not sure if I have understood your question correctly. Try the below: [code] <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml"/> <xsl:template match="imageData"> <xsl:for-each-group select="row" group-by="district"> <p><xsl:value-of select="current-grouping-key()"/></p> <xsl:for-each-group select="current-group()" group-by="taluk"> <p><xsl:value-of select="current-grouping-key()"/></p> </xsl:for-each-group> </xsl:for-each-group> </xsl:template> </xsl:stylesheet> [/code] If this is not what you expect, then post the expected output here.
I think you are talking about CDATA sections. With the below input XML [code] <Name><![CDATA[Dani]]></Name> [/code] and XSLT code [code] <xsl:template match="Name"> <xsl:value-of select="."/> </xsl:template> [/code] I got "Dani" as the output.
I'm not sure if I understood your requirement correctly, but have posted the below with an assumption: [code] <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml"/> <xsl:variable name="x" select="'Plano'"/> <xsl:template match="/"> <xsl:for-each select="//town[@placeid = $x]"> <xsl:copy-of select="following-sibling::areas[1]"/> </xsl:for-each> </xsl:template> </xsl:stylesheet> [/code] If thats not what you want, please post a minimal input XML …
Please post your input and expected output.
Try the below: [code] <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="pages"> <xsl:for-each-group select="page" group-by="title"> <ul> <li><xsl:value-of select="title"/></li> <xsl:for-each-group select="current-group()" group-by="subtitle"> <ul> <li><xsl:value-of select="subtitle"/></li> <ul> <xsl:for-each select="current-group()"> <li><xsl:value-of select="item"/></li> </xsl:for-each> </ul> </ul> </xsl:for-each-group> </ul> </xsl:for-each-group> </xsl:template> </xsl:stylesheet> [/code]
If you want to exclude an element use an empty template match like <xsl:template match="name"/>
Try the below [code] <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="Groups"> <xsl:choose> <xsl:when test="Group/GroupSelector[. = '20']"> <GroupSelection ElementName="FoundGroup" Missing="false">20</GroupSelection> <GroupSelection ElementName="GroupDes" Missing="false">Group 20</GroupSelection> <GroupSelection ElementName="GroupVal" Missing="false">XYZA</GroupSelection> </xsl:when> <xsl:when test="Group/GroupSelector[ . !='20']"> <GroupSelection ElementName="FoundGroup" Missing="true"/> <GroupSelection ElementName="GroupDes" Missing="true"/> <GroupSelection ElementName="GroupVal" Missing="true"/> </xsl:when> </xsl:choose> </xsl:template> </xsl:stylesheet> [/code]
You would got an errors while using the above xslt code. I closed all the <xsl:value-of> in the above XSLT snippet and changed [CODE]device[sub-device/@range='24' sub-device/@range='25'][/CODE] to [CODE]device[sub-device/@range='24' and sub-device/@range='25'][/CODE] I got the below output [CODE] <html> <body>0:0:0 has children. <br>0:1:0 has no children. <br>0:2:0 has no children. <br>1:0:0 has no …
I tried with two parsers and got no error. You could try with Kernow IDE (freeware from Saxonica.com).
I'm too using IE8. Please post the relevant input xml, xslt code and expected output, so that I could check.
Just get the output in the name of input xml
Please try with the below: [CODE] <xsl:template match="/DataSet/Output/Order"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:attribute name="test">test</xsl:attribute> <xsl:copy-of select="*"/> </xsl:copy> <xsl:apply-templates/> </xsl:template> [/CODE]
I used the below xml as input [CODE] <Metric name="Detail" type="Overlap"> <Element name="PFMR Inactive" metrictype="Overlap" category="MAIN" aname="Detail|PFMR Inactive" metricstatistic="UniqueValueOverlap" label="PFMR Inactive"> <OutputField name="Rome - 20101201" value="2"/> <OutputField name="Rome - 20101229" value="2"/> <OutputField name="Difference" value="0"/> <OutputField name="Cleared" value="1"/> <OutputField name="Remaining" value="2"/> <OutputField name="New" value="0"/> </Element> <Element name="FUND-CODE Invalid" metrictype="Overlap" category="MAIN" aname="Detail|FUND-CODE …
To be more clear, please post your input XML, XSLT code and the expected output XML.
Please make your question clear. Post a relevant snippet of input xml, your xslt code and the output required.
Try the below using XSLT 2.0: [CODE] <xsl:template match="text()"> <xsl:if test="preceding::comment() and following::comment()"> To test </xsl:if> </xsl:template> <xsl:template match="comment()"> <xsl:copy-of select="."/> </xsl:template> [/CODE]
Check if the works: [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml"/> <xsl:template match="Application"> <Application> <xsl:apply-templates select="Segment1"/> </Application> </xsl:template> <xsl:template match="Segment1"> <xsl:copy> <xsl:copy-of select="ID"/> </xsl:copy> <segment2> <xsl:copy-of select="//Fee"/> </segment2> </xsl:template> [/CODE]
Please post the input xml, relevant xslt and the expected output from the input xml.
To find the well-formedness errors you can just open yuor xml file in explorer and check. To validate, you should have a dtd.
Please show your input xml, the expected output and the current output. Your question is not clear.
Please check the below link. [url]http://msdn.microsoft.com/en-us/library/533texsx(v=vs.71).aspx[/url] You need to change [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo"> [/CODE] to [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="urn:my-scripts" exclude-result-prefixes="fo"> [/CODE] Also, use the below [CODE] <xsl:template match="documents"> <a href="tenancyref.htm" onClick="return user:popup(this, 'Tenancy Ref')"> <img src="alt image1.jpg" width="20" height="20" border="0"/> </a> </xsl:template> [/CODE] I'm …
The End.
mrame