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

RE: limiting your apply-templates

Subject: RE: limiting your apply-templates
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 18 Aug 2003 21:54:09 +0100
apply template first
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@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Keller, Matt
> Sent: 18 August 2003 19:40
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  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


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.