[Home] [By Thread] [By Date] [Recent Entries]
<xsl:template match="ListOfInsClaimsContact"> <xsl:apply-templates select="InsClaimsContact"/> </xsl:template> <xsl:template match="InsClaimsContact[RoleInAccident='Owner' and ContactRule='Insured']"> do anything </xsl:template> <xsl:template match="InsClaimsContact[RoleInAccident='Driver' and ContactRule='Witness']"> do anything </xsl:template> This processes the <InsClaimsContact>s in document order. If you need another order, you must change the first template: <xsl:template match="ListOfInsClaimsContact"> <xsl:apply-templates select="InsClaimsContact[RoleInAccident='Driver' and ContactRule='Witness']"/> <xsl:apply-templates select="InsClaimsContact[RoleInAccident='Owner' and ContactRule='Insured']"/> </xsl:template> Regarsd, Joerg CROFT, MICHAEL wrote: I need to search for elements that contain certain text and are part of a certain parent element. I need to search the whole document and find the specific parent element, that contains certain child elements with certain text. This information needs to be printed in order. For example: <ListOfInsClaimsContact> <InsClaimsContact Id="1-16HHT"> <BirthDate>04/08/2002 00:00:00</BirthDate> <CellularPhoneNumber>3418748901</CellularPhoneNumber> <ContactRole>Insured</ContactRole>> <PositionInVehicle>passnege of</PositionInVehicle> <RoleInAccident>Owner</RoleInAccident> </InsClaimsContact> <InsClaimsContact Id="2-16HHT"> <BirthDate>04/08/2002 00:00:00</BirthDate> <CellularPhoneNumber>3418748901</CellularPhoneNumber> <ContactRole>Witness</ContactRole>> <PositionInVehicle>passnege of</PositionInVehicle> <RoleInAccident>Driver</RoleInAccident> </InsClaimsContact> </ListOfInsClaimsContact> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



