views:

1190

answers:

1

Hello World!

I am looking to generate a ComboBox with a list from xml, and then create links from those items. Secondly, I would like to to the same, but with a list and a second xml property.

ComboBox - with the list being the "name" property.

http://hpn-marketing.com/drmc/content/index.php/specialty/flashxml/

List - with the list being the "name" property.

hpn-marketing.com/drmc/content/index.php/physician/flashxml/

Linking example:

  <specialty specialties_id="1" name="Pediatrics"/>

Would generate the link: /content/index.php/physician/specialty/1

  <physician physician_id="1" permalink="" name="Fugate, James K. Jr, MD"...

Would generate the link: /content/index.php/physician/single/1

Thanks in advance.

Adam

A: 

This should get you on the right track:

<xsl:template match="specialty">
 <xsl:text>content/index.php/physician/</xsl:text>
 <xsl:choose>
    <xsl:when test="@specialties_id">
      <xsl:value-of select="concat('specialty/', @specialties_id)" />
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="concat('single/', @physician_id)" />
    </xsl:otherwise>
 </xsl:choose>
</template>
ScottSEA