Subject: RE: [xsl] xslt 2, grouping and more on indexing. From: David.Pawson@xxxxxxxxxxx Date: Fri, 27 Aug 2004 12:42:36 +0100 |
-----Original Message----- From: Michael Kay I suggested processing each text node independently to add markup. In this situation I think the latter approach works better: instead of <xsl:copy-of select="dp:sep(text()[1])"/> do an apply-templates (perhaps in a special mode) that does a recursive descent of the entry subtree, applying regex processing to each text node that you find. Since I need to wrap (potentially) the outer CDATA content the recursive method won't work here (I think). The markup can be anywhere in the origianl <ientryX> content, which mixes markup with entry content and 'page|appendix refrences'. Davids (I was going to say hack, but I mean it in the Hackers and Painters view) method does work for me here. Summary: You can be either hacking text in XSLT 2, or Processing xml subtrees. It gets hairy when you want to do both at once. I've spent 5 minutes with Davids solution and I think he's doing via variables what I've tried externally, in multiple passes. <i>content</i> => III+contentIII- or similar. Process as text III+contentIII- => <i>content</i> (I don't think in trees as easily as David :-) Thanks both for the replies. <xsl:analyze-string select="$ientry" regex="([0-9][.0-9\-]*)"> or <xsl:analyze-stringAND-RESPECT-MARKUP select="$ientry" regex="([0-9][.0-9\-]*)"> Perhaps not. regards DaveP -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] xslt 2, grouping and more, Michael Kay | Thread | Re: [xsl] xslt 2, grouping and more, David Carlisle |
Re: [xsl] collapsing number ranges, Bruce D'Arcus | Date | Re: [xsl] xslt 2, grouping and more, David Carlisle |
Month |