Subject: Re: [xsl] creating canonRef from flat From: David Carlisle <davidc@xxxxxxxxx> Date: Fri, 19 Sep 2003 15:43:22 +0100 |
In: <r>Mateus 3.1-12; Lucas 3.1-20; </r> out: $ /c/Java/j2re1.4.0/bin/java -jar c:/saxon7/saxon7.jar regexp.xml regexp.xsl <?xml version="1.0" encoding="UTF-8"?> <parallelPassage> <canonRef Book="Mateus" chapter="3" verse="1" verseend="12"/> <canonRef Book="Lucas" chapter="3" verse="1" verseend="20"/> </parallelPassage> something in between: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output indent="yes"/> <xsl:template match="r"> <parallelPassage> <xsl:analyze-string regex="[^;]+" select="."> <xsl:matching-substring> <xsl:analyze-string regex="([A-Za-z]+) *([0-9]+)\.([0-9]+)-([0-9]+)(.*$)" select="."> <xsl:matching-substring> <canonRef Book="{regex-group(1)}" chapter="{regex-group(2)}" verse="{regex-group(3)}" verseend="{regex-group(4)}" /> </xsl:matching-substring> </xsl:analyze-string > </xsl:matching-substring> </xsl:analyze-string> </parallelPassage> </xsl:template> </xsl:stylesheet> David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] creating canonRef from flat, Jim_Albright | Thread | Re: [xsl] creating canonRef from fl, David Carlisle |
[xsl] Re: How to implement Divide a, Dipesh Khakhkhar | Date | RE: [xsl] creating canonRef from fl, Jim Fuller |
Month |