Orbeon XForms レンダラーを組み込んだアプリケーションに取り組んでいます。これを使用して、HTML ではなく XHTML を生成しています。2 つのカスタム XBL コンポーネントを使用するフォームがあります。
orbeon に渡す XHTML は正しいようです。しかし、Orbeon から生成された XHTML には、要素の xbl 名前空間の定義が<body>
2 回含まれています。これにより、有効な XML として解析されなくなります。
これは実際には非常に複雑なフォームであり、ここに投稿することはできませんが、この質問の重要な部分は次のとおりです。
<xhtml:html
xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:fw="http://orionhealth.com/forms/widgets" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:head>
<!-- Lots of stuff -->
<xbl:xbl xmlns:xbl="http://www.w3.org/ns/xbl">
<xbl:script src="...."/>
<xbl:binding id="fw-autocomplete" element="fw|autocomplete">
<xbl:template>
<!-- Lots of stuff -->
</xbl:template>
</xbl:binding>
</xbl:xbl>
<xbl:xbl xmlns:xbl="http://www.w3.org/ns/xbl">
<xbl:script src="...."/>
<xbl:binding id="fw-datetime" element="fw|datetime">
<xbl:template>
<!-- Lots of stuff -->
</xbl:template>
</xbl:binding>
<xbl:binding id="fw-date" element="fw|date">
<xbl:template>
<!-- Lots of stuff -->
</xbl:template>
</xbl:binding>
<xbl:binding id="fw-partial-date" element="fw|partial-date">
<xbl:template>
<!-- Lots of stuff -->
</xbl:template>
</xbl:binding>
</xbl:xbl>
</xhtml:head>
<xhtml:body id="body">
<!-- Lots of stuff -->
</xhtml:body>
</xhtml:html>
両方の XBL コンポーネントが定義されていますが、ドキュメントの本文ではどちらも実際には使用されていないことに注意してください。Orbon からの結果の XHTML (再び簡略化) は次のとおりです。
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:exf="http://www.exforms.org/exf/1-0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:fw="http://orionhealth.com/forms/widgets"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xxforms:noscript="true">
<head>
<!-- Lots of Stuff -->
</head>
<body xmlns:xbl="http://www.w3.org/ns/xbl" xmlns:xbl="http://www.w3.org/ns/xbl"
id="body"
class="yui-skin-sam">
<!-- Lots of Stuff -->
</body>
</html>
xmlns:xbl="http://www.w3.org/ns/xbl"
body タグの重複に注意してください。
グーグル この問題について何も見つけられませんでした。これを引き起こす原因と、それを修正するために何ができるかを知っている人はいますか?
<xhtml:html>
各要素の代わりに要素にxbl プレフィックスを定義して<xbl:xbl>
も問題はないようで、Orbeon から生成された XHTML には、このプレフィックスが<xhtml:html>
要素に 1 回しか定義されていないことに気付きました。