Subject: RE: [xsl] question regd. xsl translation... From: "Michael Kay" <mhk@xxxxxxxxx> Date: Wed, 2 Jul 2003 21:47:25 +0100 |
I suspect this problem is at the JSP level. Data written as <xxxx> is not going to work in a stylesheet that specifies <xsl:template match="xxxx" unless it is double-parsed - one parse to turn the < character into a < character, and a second parse to recognize the < as markup indicating an element node. So you need to tell us more about where the XML document comes from and how it is processed. Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of xsl user > Sent: 02 July 2003 17:40 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] question regd. xsl translation... > > > > Hi All, > > I'm new to the mailing list and I'm facing problems with the > html generation using xsl. following is the snippet of the xsl > template that behaves differently under different translators: > > <xsl:template match="xxxx"> > <xsl:element name="pre"> > <xsl:variable name="report" select="."/> > <xsl:value-of select="$report"/> > </xsl:element> > </xsl:template> > > Following is the snippet of the data that works with saxon > and generates the right html. > > <message><xxxx> > 1. isctmp1 > 1.1. FastEthernet1/0/0 --- 10.2.2.161 > 1.2. FastEthernet3/1/1 --- 10.2.3.97 > 6.22. FastEthernet1/1 --- 10.2.3.86 > </xxxx></message> > > but the jsp page i'm trying to modify uses jdk packages for > xsl translation and it does not generate the html when i > pass the above data, but when the following data is passed > it processes the templates and generates the html right. > > data-set-that-works-with-jdk > > <message><xxxx> > 1. isctmp1 > 1.1. FastEthernet1/0/0 --- 10.2.2.161 > 1.2. FastEthernet3/1/1 --- 10.2.3.97 > 6.22. FastEthernet1/1 --- 10.2.3.86 > </xxxx></message> > > I think saxon is doing the right thing as i remember > reading from your FAQ that entity references are for > parser's convenience only, and they are not xml elements. > > Could you experts clarify it for me please ? > > Also, which component is the source of the above behavior ? > is it SAX parser or xslt processor ? > > Is anyone aware of a workaround i could use to fix the > problem without having to use a different processor like > saxon ? (the jsp page is pat of a common component that affects many) > > the jsp page uses the jdk 1.4 packages: > > org.xml.sax.* > javax.xml.transform.TransformerFactory > javax.xml.transform.Transformer > javax.xml.transform.Source javax.xml.transform.stream.StreamSource > javax.xml.transform.stream.StreamResult > > Thanks in advance. I appreciate your help. > > //rick > > > 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] question regd. xsl translatio, xsl user | Thread | RE: [xsl] question regd. xsl transl, xsl user |
RE: [xsl] Namespaces II, Michael Kay | Date | RE: [xsl] passing parameter to temp, Michael Kay |
Month |