xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dane Foster" <dfos...@equitytg.com>
Subject XPath help
Date Wed, 15 Nov 2000 16:41:04 GMT
Hello all.  I'm new to XPath and the transformation aspect of XML and as such, I'm unaware
of any best practices techniques.  So, I'm trying to find out if there is a better and/or
faster way to find out if an element exist.  If it does, I want to print out some text along
with it's value, and if it doesn't, then do nothing.  Any recommendations will be appreciated

<!-- Style sheet fragment -->

<td align="center" width="336">

<font face="Lucida Sans Unicode, Verdana, Tahoma, Courier New, Courier" size="-1">

<!-- XSLT starts here -->

<b><xsl:value-of select="state"/><xsl:if test="boolean(../secHeader/executiveCountry
)">, <xsl:value-of select="executiveCountry"/></xsl:if></b>

<!-- XSLT ends here-->


<br /><font face=" Courier New, courier" size="-1">State or other jurisdiction
of incorporation or organization)</font>


<!-- End fragment -->

<!-- XML source fragment -->



<company>Equity Technology Group Inc.</company>




<executiveAddress>530 S. Federal Highway Suite 150</executiveAddress>

<executiveCity>Deerfield Beach</executiveCity>



<!-- The executiveCountry element may or may not appear. It's schema representation is:
&lt;xsd:elment name="executiveCountry" type="xsd:string" minOccurs="0" maxOccurs="1"/&gt;-->



<principalAddress>530 S. Federal Highway Suite 150</principalAddress>

<principalCity>Deerfield Beach</principalCity>




<agent-for-service>Billy Bob Law Services</agent-for-service>

<agentAddress>8632 S. Sutton Dr</agentAddress>


<agentState>New England</agentState>





<!-- end XML source fragment -->

Dane Foster

View raw message