Commit 689bb604 authored by Jean Vintache's avatar Jean Vintache

fix input file name in first xsl

parent d191816b
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.utc.fr/ics/hdoc/xhtml" exclude-result-prefixes="xs">
<xsl:output method="xml" indent="yes"></xsl:output>
<xsl:strip-space elements="*"/>
<xsl:param name="text-encoding" as="xs:string" select="'utf-8'"/>
<xsl:param name="text-uri" as="xs:string" select="'file:///G:/Documents/Dropbox/NF29/etherpad/antce/input/NF29_HdocEtherpad.etherpad'"/>
<xsl:template name="text2xml">
<xsl:variable name="text" select="unparsed-text($text-uri, $text-encoding)"/>
<xsl:analyze-string select="$text" regex='\{{"atext":\{{"text":"(.*?)",'>
<xsl:matching-substring>
<div>
<p>
<xsl:value-of select="normalize-space(regex-group(1))"/>
</p>
</div>
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:template>
<xsl:template match="/">
<html>
<head>
<title>Etherpad</title>
<meta charset="utf-8"/>
</head>
<body>
<section>
<header>
<h1>Contenu</h1>
</header>
<xsl:choose>
<xsl:when test="unparsed-text-available($text-uri, $text-encoding)">
<xsl:call-template name="text2xml"/>
</xsl:when>
</xsl:choose>
</section>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
......@@ -8,7 +8,7 @@
<xsl:strip-space elements="*"/>
<xsl:param name="text-encoding" as="xs:string" select="'utf-8'"/>
<xsl:param name="text-uri" as="xs:string" select="'../input/sample.html'"/>
<xsl:param name="text-uri" as="xs:string" select="'../tmp/pad-clean.xml'"/>
<xsl:template name="text2xml">
<xsl:variable name="text" select="unparsed-text($text-uri, $text-encoding)"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment