You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Petr Kadlec (Jira)" <ji...@apache.org> on 2023/01/12 12:04:00 UTC
[jira] [Commented] (SANTUARIO-169) Restore XMLUtils.createDSctx method
[ https://issues.apache.org/jira/browse/SANTUARIO-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17675973#comment-17675973 ]
Petr Kadlec commented on SANTUARIO-169:
---------------------------------------
For reference: Note the method has been removed again in [r1066546|https://svn.apache.org/viewvc?view=revision&revision=1066546]. But it is fairly trivial, you can copy-paste its implementation to your code:
Basically instead of {{Element ctx = XMLUtils.createDSctx(doc, prefix, namespace);}}, you can write
{code:java}
Element ctx = doc.createElementNS(null, "namespaceContext");
ctx.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:" + prefix.trim(), namespace);
{code}
(see [the original reverting patch|https://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java?r1=686024&r2=686023&pathrev=686024]).
> Restore XMLUtils.createDSctx method
> -----------------------------------
>
> Key: SANTUARIO-169
> URL: https://issues.apache.org/jira/browse/SANTUARIO-169
> Project: Santuario
> Issue Type: Bug
> Security Level: Public(Public issues, viewable by everyone)
> Components: Java
> Environment: Operating System: All
> Platform: All
> Reporter: sean.mullan
> Priority: Major
>
> This public method was removed in the 1.4.2 release with the assumption
> that nobody used it. However, we have code that depends on it and
> now fails to compile against 1.4.2. Thus, we should restore this method.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)