Re: Group by Element based on Attribute inside contain
Now for the syntax, please describe why you did this and what it does. If you can break down the statement 'substring' and what 6,4 1,2 4,2 does that would be very helpful.
The substring() function is just the usual substring function which takes a part out of a string. The only thing this in XSLT in which this is unusual is that this function is 1-based, as opposed to 0-based, as in all languages I'd learnt before. So in "substring('abcde', 2, 3)", the second argument says where to start extracting the substring and the third one says how many characters to extract, and this returns "bcd".
And for this comment, '<!-- Extend this to display more information. -->', do you mean I can add the following statement in order to show more Inspection details on the output?
Looks like that should work. Give it a try.
<xsl:template match="ObjectClassRow"> <!-- Extend this to display more information. --> <xsl:value-of select="ObjectClassField[ @name = 'Date Inspected']"/> <xsl:text> </xsl:text> </xsl:template>
And my final question, how can I turn a value in the XML into another value shown in the XSL output. For "Repairs Made" we store it is an integer, but I want to show it as Yes or No based on 0 or 1.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format