Hello,

I have a problem with an XPath. My XML-Document that i want to format
with my XSLT-stylesheet is a storylist which contains a number of
stories which contains a title and a body-element. The body element
contains an attribute called language. Here is a excerpt of my DTD:

<!ELEMENT storylist  (story*) >
<!ELEMENT story  (body, title) >
<!ATTLIST story
                   id  ID    #REQUIRED 
                   xreftext  CDATA    #IMPLIED  
                   author CDATA #IMPLIED 
                   category CDATA #IMPLIED>
<!ELEMENT body  (#PCDATA | xref | seealso | url)* >
<!ATTLIST body
                language (en|de|es|it|jp)        "de"> 
...

I'm using a key 'language-index' to get all messages of the same
languages:
  <xsl:key name="language-index" match="body" use="@language"/>


I want to iterate through those stories after i sort the by the
author-attribute that is in the body of the story i do this inside
<xsl:template match="/">:        
<xsl:for-each select="key('language-index', $targetLanguage)">
                <xsl:sort select="ancestor::story/@author"/>

Now i want to print some text only if the author of the story has
changed from the preceding story. 

My problem is that i don't know how to access the author-attribute of
the preceding sibling. I have tried a couple of different syntaxes but
none of them worked what i want is someting like this:
   preceding-sibling::story[1]/@author
but that returns NULL.

i can access the author associate with the current body-node like this:
   ancestor::story[1]/@author

thanks for help

jacques

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to