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

Re: template matching on text value of a parent......n

Subject: Re: template matching on text value of a parent......not
From: "Ihe Onwuka ihe.onwuka@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Aug 2014 20:39:10 -0000
Re:  template matching on text value of a parent......n
Ok have added a strip-space.

Now the stylesheet outputs
Typology0CAPTypology1Typology2Typology3Typology4INTGlobalCashflowTypology
which is exactly the same value as is being tested for in the template
rule. So given that I am still wondering why the rule didn't fire.

I did not understand Dmitre's post.



On Thu, Aug 14, 2014 at 9:28 PM, Martin Honnen martin.honnen@xxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> Do you have `strip-space`? Otherwise there will be lots of white space in
> the string value of the root element.
> --
> Diese Nachricht wurde von meinem Android Mobiltelefon mit GMX Mail
> gesendet.
>
>
>
> "Ihe Onwuka ihe.onwuka@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx
> >schrieb:
>>
>>  Here is some XML
>>
>>  <flowTypologies type="flowTypologies">
>>    <flowTypology type="flowTypology">
>>      <label type="string">Typology0</label>
>>      <value type="string">CAP</value>
>>    </flowTypology>
>>    <flowTypology type="flowTypology">
>>      <label type="string">Typology1</label>
>>      <value type="string"/>
>>    </flowTypology>
>>    <flowTypology type="flowTypology">
>>      <label type="string">Typology2</label>
>>      <value type="string"/>
>>    </flowTypology>
>>    <flowTypology type="flowTypology">
>>      <label type="string">Typology3</label>
>>      <value type="string"/>
>>    </flowTypology>
>>    <flowTypology type="flowTypology">
>>      <label type="string">Typology4</label>
>>      <value type="string">INT</value>
>>    </flowTypology>
>>    <flowTypology type="flowTypology">
>>      <label type="string">GlobalCashflowTypology</label>
>>      <value type="string"/>
>>    </flowTypology>
>>  </flowTypologies>
>>
>>
>>  Here is a stylesheet snippet to transform it.
>>
>>   <xsl:stylesheet
>>          xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>  exclude-result-prefixes="xs" version="1.0">
>>
>>     <xsl:template  match="flowTypologies[. =
>> 'Typology0CAPTypology1Typology2Typology3Typology4INTGlobalCashFlowTypology']">
>>
>>        <xsl:text>I should get here</xsl:text>
>>     </xsl:template>
>>
>>  </xsl:stylesheet>
>>
>>  So the hope was that to template match on the the text value of the top
>> level node. The string in the template predicate should be the
>> concatenation of the text in all the subordinate nodes under
>> flowTypologies.
>>
>>  However it does not match.
>>
>>  This is an XSLT 1.0 stylesheet I have tried transforming it with Saxon
>> 6.5 and Xalan.
>>
>>  I have done a value-of on flowTypologies and it does yield the value
>> being tested for in the predicate, but rule never fires.
>>
>>
>>    XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
>> EasyUnsubscribe <http://-list/582271> (by email)
>>
>   XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/601651> (by
> email <>)

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.