[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: cross document id idref pair checks

Subject: RE: cross document id idref pair checks
From: DPawson@xxxxxxxxxxx
Date: Tue, 9 Jan 2001 15:47:56 -0000
xsl id idref
> > <xsl:template match="par/a">
> > <xsl:variable name="x" select="substring-after(@href,'#')"/>
> > <xsl:for-each select="document(substring-before(@href,'#'))">
> >   <xsl:if test="id($x)/parent::par">
> >     yes
> > 
> 
> yes, thats it. 
> 
> id()/axis ! Thats a first for me!


Except it isn't, because I'm not using ID, I'm using id... if that makes
sense :-)
<xsl:variable name="ref" select="substring-after(@href,'#')"/>
<xsl:variable name="smil-file-el" 
  select="document(@href)/smil/body//*[@id=$ref]"/>
<xsl:variable name="lineNo" select="saxon:lineNumber()"/>
<xsl:for-each select="$smil-file-el">
  <xsl:if test="not(name()='par' or name()='text')">
TN 76: Line <xsl:value-of select="$lineNo"/>.  <xsl:value-of
select="$msg/TN76"/></xsl:if>
</xsl:for-each>

eventually did it.

Which leaves me with another problem.

When using well formed, as apposed to valid, input,
How to use the fact that a node-set removes duplicates to
check if there is more than one attribute named 'id'?

count(id(@id)) would be ideal, except... as above :)
[Damn, I knew there was a use for DTD's]

Regards DaveP





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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.