xsl-list
[Top] [All Lists]

RE: limiting your apply-templates

2003-08-18 13:54:09
I'm rather surprised by your methodology. Surely if the code works in
one environment, but stops working in another, then you need to find out
what has changed that might have caused it to break, rather than
experimenting with different ways of writing the code?

Start by finding out which XSLT processor and XML parser are being used
in the two cases. Does the XML document reference a DTD, and if so, is
the same DTD being used in both cases? Does the stylesheet accept any
parameters? Does it call the document() function?

I'm throwing out guesses here. But it's clearly a configuration or
environment problem. It might be that there's something in your
stylesheet code that isn't portable, but it's not the bit that you've
shown us.

Michael Kay

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Keller, Matt
Sent: 18 August 2003 19:40
To: XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] limiting your apply-templates


First of all, my XML looks like this:

<Output>
    <Contracts>
        <Contract>
            <ContractId>P12345</ContractId>
            <ContractName></ContractName>
            <SbuId></SbuId>
            <BusUnitURL></BusUnitURL>
        </Contract>
        <Contract>
            <ContractId>P12346</ContractId>
            <ContractName></ContractName>
            <SbuId></SbuId>
            <BusUnitURL></BusUnitURL>
        </Contract>
        <Contract>
            <ContractId>Q92478</ContractId>
            <ContractName></ContractName>
            <SbuId></SbuId>
            <BusUnitURL></BusUnitURL>
        </Contract>

This XML is used by an app that runs on Websphere 3.5.  
Currently, I apply a template that ignores contracts that 
start with Q.  It looks like this:

<xsl:apply-templates mode="contractList_tab2" 
select="/Output/Contracts/Contract[not(substring(ContractId,1,
1)='Q' or substring(ContractId,1,1)='q')]" />

However, we are in the process of upgrading to Websphere 5.0. 
 In that environment, my template does not appear to block 
the Q contracts any longer.  Is there another approach I can 
take in the XSL to block those contracts?

Thanks,

Matt

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>