Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] 2 questions

From: Nathan Shaw <n8_shaw@--------->
To:
Date: 5/1/2002 4:41:00 AM
Hi all, I have two rather basic questions that I could
not find the answers to in the FAQ. (I am using
Saxon).

1) I know that there is no need to check for
string-length() when checking to see if an element is
empty or not, but the following checks seem to be
failing in my XSLT and I am not sure why.

<xsl:template
match="HQPAO|CenterPAO|InstitutionalPAO">
	<p>
		<xsl:value-of select="FName" /><xsl:text>
</xsl:text><xsl:value-of select="LName" /><br />
		<xsl:if test="JobTitle"><xsl:value-of
select="JobTitle" /><br /></xsl:if>
		<xsl:if test="OrgName"><xsl:value-of
select="OrgName" /><br /></xsl:if>
		<xsl:if test="Address"><xsl:value-of
select="Address" /><br /></xsl:if>
		<xsl:if test="SubAddress"><xsl:value-of
select="SubAddress" /><br /></xsl:if>
		<xsl:if test="Phone">Phone: <xsl:value-of
select="Phone" /><br /></xsl:if>
		<xsl:if test="Fax">Fax: <xsl:value-of select="Fax"
/><br /></xsl:if>
		<xsl:if test="Email">Email: <xsl:value-of
select="Email" /></xsl:if>
	</p>
</xsl:template>

2) How does one check to see what the parent of an
element is? I am currently trying this, with no luck.

<xsl:template
match="Link[parent::node()='RelatedLinks']">

I want only those links elements that have the parent
element 'RelatedLinks,' as I am treating them
differently than the other links in my xml doc
(putting them into a list). If there is a better way
to do this, than I am open to suggestions.

Thanks,

--Nate

=====
----------------------------
Nathan Shaw
Senior Web Applications Developer
iaffect, Inc.
http://www.iaffectonline.com
----------------------------

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent