xsl-list
[Top] [All Lists]

Re: [xsl] Detecting a closing tag in xslt

2006-05-04 08:11:29
<xsl:template match="list1"><xsl:value-of select=".">
"END"
</xsl:template>
<xsl:template match="graphic">
<xsl:copy/>
</xsl:template>

would be one possibility, although not 100% certain I understood what
you meant about <Textfrom list1>
"END"
<graphic element should go here>
On 5/4/06, Tech Savvy <tecsavvy(_at_)gmail(_dot_)com> wrote:
Hi:

Thank you for your response. This is what I need to achieve:

My PDF looks like this after the transformation:

1. <Textfrom list1>
"END"
<graphic element should go here>

Basically, I need the line "END" after <list1> ends and before the
<graphic> element starts. I tried hardcoding this on the style sheet
but it does not work. Is there any other way to achieve it?




On 5/4/06, Jon Gorman <jonathan(_dot_)gorman(_at_)gmail(_dot_)com> wrote:
> On 5/4/06, Tech Savvy <tecsavvy(_at_)gmail(_dot_)com> wrote:
> > Hi:
> >
> > I have an xml file like this:
> >
> > <list1>
> >
> > ......
> > </list1>
> >
> > <graphic>
> >
> > </graphic>
> >
> > Is there a way to detect the closing tag </list1> in XSLT?
>
> Ummm, no.  That's the point of the underlying model.  Things get read
> into the parser, then the processor deals with the tree of elements,
> attributes, and other types of node.  That being said, there might be
> some tricky way to force it XSLT 2.0.  If you want to use a streaming
> model, there's SAX.
>
> Why do you think you need to see the closing tag?  Odds are there's a
> way to do what you want in XSLT.
>
> Jon Gorman
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--