JSR-105 签名输出参考

发布于 2024-11-08 17:39:03 字数 769 浏览 5 评论 0原文

我正在研究 W3C Widgets 规范。我对 JSR-105 功能有疑问。

谁能告诉我如何引用 XMLObject?

<?xml version="1.0" encoding="UTF-8"?>
<Signature>
  <SignedInfo>
    <Reference URI="#prop"/> <!-- How can I refer the Object? Isn't it the actual output? -->
  </SignedInfo>
  <Object Id="prop"/> 
</Signature>

我认为我可以使用 XMLSignatureFactory 中的那些 newXXX 方法来制作 XML 部分。但我无法找出为此创建 Reference 对象的方法。因为我找不到为 XMLObject 实例创建 NodeSetData 的方法。

我当前的解决方案是...

  1. 创建一个包含 Object 元素及其子元素的 org.w3c.dom.Document
  2. 并让 URIDereferencer 返回该元素的 NodeSetData

这是最好的方法吗?有什么首选方式吗?

I'm working on the W3C Widgets Spec. I have a question with JSR-105 features.

Can anybody please tell me how to refer the XMLObject?

<?xml version="1.0" encoding="UTF-8"?>
<Signature>
  <SignedInfo>
    <Reference URI="#prop"/> <!-- How can I refer the Object? Isn't it the actual output? -->
  </SignedInfo>
  <Object Id="prop"/> 
</Signature>

I thought that I can make the XML part with those newXXX methods in the XMLSignatureFactory. But I couldn't figure out the way to make the Reference object for this. Because I couldn't find the way to make a NodeSetData for the XMLObject instance.

My current solution is...

  1. Make an org.w3c.dom.Document containing the Object element and it's children.
  2. And make a URIDereferencer returns a NodeSetData for the element.

Is this the best way? Is there any preferred way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文