Subject: Re: XSL Limitation? Is this possible? From: Rick Geimer <rick.geimer@xxxxxxx> Date: Fri, 14 May 1999 10:54:51 -0700 |
I believe the following would work for you in IE5, though the latest XSL standard specifies some changes. <xsl:template xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:qxsl="quote:http://www.w3.org/TR/WD-xsl"> <HTML> <BODY> <xsl:apply-templates select="/*"/> </BODY> </HTML> <xsl:define-template-set> <xsl:template match="PARAGRAPH"> <xsl:apply-templates/> </xsl:template> <xsl:template match="SENTENCE"> <xsl:apply-templates select="node()"> <xsl:template match="text()"><xsl:value-of/></xsl:template> </xsl:apply-templates> </xsl:template> <xsl:template match="SUBJECT"> <B> <xsl:apply-templates select="node()"> <xsl:template match="text()"><xsl:value-of/></xsl:template> </xsl:apply-templates> </B> </xsl:template> <xsl:template match="VERB"> <B> <xsl:apply-templates select="node()"> <xsl:template match="text()"><xsl:value-of/></xsl:template> </xsl:apply-templates> </B> </xsl:template> </xsl:define-template-set> </xsl:template> Hope this helps. Rick Geimer National Semiconductor rick.geimer@xxxxxxx Nicolas Pottier wrote: > Hello everybody.. > > I'm currently learning XSL, mostly using IE5 as my current platform, and > have run into the following problem, which I have yet to figure out. > > Let's take this data. > > <PARAGRAPH> > <SENTENCE>Grumpy <SUBJECT>Jack</SUBJECT> <VERB>went</VERB> up the > hill.</SENTENCE> > </PARAGRAPH> > > Is it possible to use XSL to convert that data into the following? > > <HTML> > <BODY> > Grumpy <B>Jack</B> <B>went</B> up the hill. > </BODY> > </HTML> > > As far as I've figured out, it doesn't seem possible, the main problem > being that text is being mixed with other elements, and I'm unable to > separate them out when parsing it. > > We've been racking our brain on this one for a little while and can't > seem to figure it out. > > Anybody have any ideas? This is something that is so simple in CSS, but > seems impossible in XSL. > > Thanks, > > -Nic > > PS. I apologize if this has been covered before, I tried looking through > the archives but couldn't find anything relevant. (though I did find > some useful examples out there) > > 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 Limitation? Is this possible?, Nicolas Pottier | Thread | Re: XSL Limitation? Is this possib, Emmanuel.Leguy |
RE: XSL Limitation? Is this possib, Pete Beazley | Date | RE: auto/embed is not node transclu, Robert Streich |
Month |