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

Re: Calling templates based on node contents

Subject: Re: Calling templates based on node contents
From: "cking" <cking@xxxxxxxxxx>
Date: Wed, 18 Aug 2004 13:05:28 +0200
xsl hascontent
Hi Ben,

> Currently all of the contentFields go through the
> <xsl:template match="." mode="defaultField_A"> template.

Given the XSL you included, that's normal: there's only one apply-templates:
<xsl:apply-templates mode="defaultField_A" select="contentFieldValue">

I can't see where (or under what conditions) you want to invoke the other mode?
Maybe you don't really need different modes altogether, but that's difficult
to say without more information.

BTW. it seems like the first two templates are meant for contentFieldValue
elements only, personally I would use match="contentFieldValue" here
rather than match="."

Best regards
Anton



----- Original Message ----- 
From: "Ben Gazzard" <BenG@xxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, August 18, 2004 12:25 PM
Subject:  Calling templates based on node contents


Hi All...

Have a little problem. Basically I have this XML structure:

<contentTable>
  <contentPage hasContent="1">
    <contentField ID="0" UID="31">
      <contentFieldID>0</contentFieldID>
      <contentFieldUID>31</contentFieldUID>
      <contentFieldName>new_Content_Field_0</contentFieldName>
      <contentFieldStyle>default</contentFieldStyle>
      <contentFieldElement>defaultField</contentFieldElement>
      <contentFieldHR>True</contentFieldHR>
      <contentFieldBTT>False</contentFieldBTT>
      <contentFieldValue>
        <contentItem ID="0">
          <contentItemValue type="text">Default text</contentItemValue>
          <contentItemValue type="label">Default label</contentItemValue>
          <contentItemValue type="url">Default url text</contentItemValue>
          <contentItemValue type="file">Default file text</contentItemValue>
          <contentItemValue type="DLfile">Default download text</contentItemValue>
        </contentItem>
      </contentFieldValue>
    </contentField>
  </contentPage>
</contentTable>

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.