In my XML input file (output from another program over which I have no control), I have package nodes that look like this:
Each "ClothingMesh" package node has one or more "ClothingRecolour" package nodes associated with it, identified by the <tgis> node and its attributes.
I can extract the information I want about the ClothingMesh package nodes with this code:
Is there a way to also list the subfolder and filename nodes for the "ClothingRecolour" package nodes with matching tgis nodes? As I said, there will be at least one, and possibly many recolors for each mesh. Output should look something like this:
Code:
<packages ptype="ClothingMesh" isOrphan="false" isBroken="false" ptype2="3">
<filename>MESH_afTop_34Dn_Tshirt.package</filename>
<title />
<description />
<filesize>405103</filesize>
<lastmodified>2007-05-17T00:00:00.0000000-04:00</lastmodified>
<subfolder>\Warlokk</subfolder>
<polyCount>0</polyCount>
<md5hash>2F48E16A185E5D2291EBEA5F43FA4AB0</md5hash>
<catalogPlacement />
[red]<tgis tgi_type="FC6EB1F7" tgi_group="1C050000" tgi_instance2="B1BF1329" tgi_instance="FF121E17" />[/red]
</packages>
Each "ClothingMesh" package node has one or more "ClothingRecolour" package nodes associated with it, identified by the <tgis> node and its attributes.
Code:
<packages ptype="ClothingRecolour" isOrphan="false" isBroken="false" ptype2="2">
<filename>psaftop_t_blank.package</filename>
<title>aftoptshirt_whitevneck </title>
<description>T-Shirt Top Mesh Only by The Pearl</description>
<filesize>282441</filesize>
<lastmodified>2006-10-25T00:00:00.0000000-04:00</lastmodified>
<subfolder>\simshost</subfolder>
<polyCount>0</polyCount>
<md5hash>6F26EB7F981CF490391322F11E63E148</md5hash>
<catalogPlacement>Female Everyday </catalogPlacement>
[red]<tgis tgi_type="FC6EB1F7" tgi_group="1C050000" tgi_instance2="B1BF1329" tgi_instance="FF121E17" />[/red]
</packages>
I can extract the information I want about the ClothingMesh package nodes with this code:
Code:
<xsl:template match="packages">
<xsl:if test="@ptype = 'ClothingMesh'">
<xsl:apply-templates select="subfolder"/>\<xsl:apply-templates select="filename"/><br />
</xsl:if>
</xsl:template>
<xsl:template match="subfolder">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="filename">
<xsl:apply-templates/>
</xsl:template>
Is there a way to also list the subfolder and filename nodes for the "ClothingRecolour" package nodes with matching tgis nodes? As I said, there will be at least one, and possibly many recolors for each mesh. Output should look something like this:
Code:
\Warlokk\MESH_afTop_34Dn_Tshirt.package<br />
<ul>
<li>\simshost\psaftop_t_blank.package<br /></li>
<li>\simshost\psaftop_t_blank2.package<br /></li>
<li>\simshost\psaftop_t_blank3.package<br /></li>
<li>\simshost\psaftop_t_blank4.package<br /></li>
</ul>