Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<xsl:variable> doesn't work on RHEL4 #4

Open
jangid opened this issue Jun 16, 2011 · 3 comments
Open

<xsl:variable> doesn't work on RHEL4 #4

jangid opened this issue Jun 16, 2011 · 3 comments

Comments

@jangid
Copy link

jangid commented Jun 16, 2011

Below are the contents of files test.py and test.xsl. The script (test.py) works with python 2.6 installed on RHEL5 but it doesn't work on RHEL4 with python 2.6.

######### test.py

from amara.xslt import transform

html = '

Hello World

'
html = transform(html, "test.xsl")
print html

##### test.xsl

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:fn="http://www.w3.org/2005/xpath-functions">

<xsl:output omit-xml-declaration="yes" indent="yes"
encoding="ISO-8859-1"/>

<xsl:template name="decode">
<xsl:variable name="c1" select="string('Hello Pankaj')"/>
<xsl:value-of select="$c1"/>
/xsl:template

<xsl:template match="p">
xsl:copy
<xsl:call-template name="decode"/>
/xsl:copy
/xsl:template

<xsl:template match="@|node()">
xsl:copy
<xsl:apply-templates select="@
|node()"/>
/xsl:copy
/xsl:template

/xsl:stylesheet

@jangid
Copy link
Author

jangid commented Jun 16, 2011

Oops the xml tags are interpreted by the editor. How to escape here?

@jangid
Copy link
Author

jangid commented Jun 16, 2011

How to escape?

@uogbuji
Copy link
Contributor

uogbuji commented Jun 20, 2011

You have to use GitHub Flavored Markdown: http://github.github.com/github-flavored-markdown/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants