-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Thank you for creating and sharing this great library! 😃
I have a lot of already programmed xsl-scripts, which use namespaces like this. They could be successfully processed with xsltproc
, but not with this processor, see the following example:
Input string:
<?xml version="1.0" encoding="ISO-8859-1"?>
<ClinicalDocument xmlns="http://testnamespace">
<test name="test1" />
<test name="test2" />
<test name="test3" />
<test name="test5" />
</ClinicalDocument>
With the following xsl-script, I got the excepted output with xsltproc
:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:n="http://testnamespace">
<xsl:template match="/">
<xsl:copy-of select="n:ClinicalDocument/n:test" />
</xsl:template>
</xsl:stylesheet>
Output:
<?xml version="1.0"?>
<test xmlns="http://testnamespace" name="test1"/><test xmlns="http://testnamespace" name="test2"/><test xmlns="http://testnamespace" name="test3"/><test xmlns="http://testnamespace" name="test5"/>
But with the xslt-processor
it only works like this (so only without namespace):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:n="http://testnamespace">
<xsl:template match="/">
<xsl:copy-of select="ClinicalDocument/test" />
</xsl:template>
</xsl:stylesheet>
How could I apply the namespace correctly so that I do not have to change all xsl-scripts?
Would be nice to get some reply!
Thank you and best!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working