cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heather Rankin" <Heather.Ran...@bbc.co.uk>
Subject RE: problem with document() function
Date Wed, 11 Jun 2008 13:40:55 GMT
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:j.hoechstaedter@memocomp.de] 
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message