Subject: RE: [xsl] limiting your apply-templates From: "Michael Kay" <mhk@xxxxxxxxx> Date: Mon, 18 Aug 2003 21:54:09 +0100 |
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: [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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] limiting your apply-templates, Keller, Matt | Thread | RE: [xsl] document() function can't, Brook Ellingwood |
RE: [xsl] document() function can't, Brook Ellingwood | Date | RE: [xsl] Importing XML into XSL vi, Michael Kay |
Month |