Closed ballsteve closed 4 months ago
In the attachment I attach what does not work for me.
I expect (Xalan xml/test2.xml xml/test2.xslt
result):
<?xml version="1.0" encoding="utf-8"?>
<dat:dataPack xmlns:dat="http://www.stormware.cz/schema/version_2/data.xsd" xmlns:int="http://www.stormware.cz/schema/version_2/intDoc.xsd">
<int:head>XSLT in Rust</int:head>
<int:body>A simple document.</int:body>
</dat:dataPack>
But I only get:
<dataPack>
<head>XSLT in Rust</head>
<body>A simple document.</body>
</dataPack>
Thank you for answer.
Apologies for the delay, looking into this now.
I can see the issues is twofold (based on branch InterP1, the upcoming release branch).
On the file xslt.rs, function to_transform(), we are not inlcuding namespaces.
Ok(Transform::LiteralElement(
QualifiedName::new(None, None, a.to_string()),
Box::new(Transform::SequenceItems(content)),
))
In addition, although namespace prefixes will appear if the above code is modified, the method to_xml() in the file intmuttree does not include namespace declarations.
@ballsteve I think we should try to get a fix for this into the next release.
Yes, this is a critical issue.
As a first step I'll make sure there is a test in the test suite for this issue.
As part of the release process, we'll make sure that all tests pass.
I've added a test for this issue on branch issue-58.
The test in branch issue-58 has been implemented and the test now passes. Once this branch has been merged the issue can be closed.
Latest release includes this fix
Discussed in https://github.com/ballsteve/xrust/discussions/57