Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
689bb604
Commit
689bb604
authored
Dec 21, 2015
by
Jean Vintache
Browse files
fix input file name in first xsl
parent
d191816b
Changes
2
Hide whitespace changes
Inline
Side-by-side
etherpad_to_hdoc/xsl/etherpad2hdoc.xsl
deleted
100755 → 0
View file @
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
etherpad_to_hdoc/xsl/html2xhtml.xsl
View file @
689bb604
...
...
@@ -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.ht
ml'"
/>
<xsl:param
name=
"text-uri"
as=
"xs:string"
select=
"'../
tmp/pad-clean.x
ml'"
/>
<xsl:template
name=
"text2xml"
>
<xsl:variable
name=
"text"
select=
"unparsed-text($text-uri, $text-encoding)"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment