Hi Johannes,

You should be able to use the document() function to interrogate the
contents of an external XML file. It is also a good idea to use
doc-available() first to check for the existence of the file and build
the tree in memory.

Heather

-----Original Message-----
From: Johannes Hoechstaedter [mailto:[EMAIL PROTECTED] 
Sent: 11 June 2008 12:18
To: users@cocoon.apache.org
Subject: problem with document() function

Hello everybody,

I have a for-each statement in my style sheet:

<xsl:for-each select="*">
          <td>
             
              <input type="text" value="{current()}" name="{name()}"/>
                 
          </td>
</xsl:for-each >

This snippet puts out the content of all nodes into text fields. Now I
want to make a distinction. Some values should be in a text field and
some values should be displayed only. Which nodes should be displayed
and which not is stored in a persitent xml file. What I thought of, is
something like this:

<xsl:for-each select="*">
        
    <td>
            
       <xsl:if
test="CurrentNodeIsContentOfExampleNodeOfPersitentXmlFile')">

              <input type="text" value="{current()}" name="{name()}"/>

       </xsl:if>
                 
     </td>
</xsl:for-each >


How can I do this? Is this possible?


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


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                        

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

Reply via email to