[Xsltforms-support] Namespace issue (not quite newbie)...
Brought to you by:
alain-couthures
|
From: Ralph C. <ra...@ra...> - 2021-12-05 16:06:20
|
Hi all,
You were kind enough to help me earlier in the year when I was looking
at xsltforms for the first time, and things have moved a long way from
there. But I'm hitting a problem going back through the documents and
forms trying to make them conformant with TEI (not my choice, because
we're not actually encoding text, but anyway). These problems arose
early on, so I removed it and ran everything through the empty namespace
(xmlns="").
So target (e.g.) is:
<TEI xmlns="">
....................
<listPerson/>
</TEU>
And the instance that populates it is:
<xf:instance id"XX">
<items xmlns="">
<listPerson/>
</items>
</xf:instance>.
On the form itself, the input fields all use the xf: prefix, so
<xf:input ref="instance('XX')/listPerson/person"> etc. An xquery POST
then inserts the instance data (using request:get-data()/*) into the
original xml document.
This all works absolutely fine and does everything I would expect it to.
However, if I change the namespace in the instance to <items
xmlns="http://www.tei-c.org/ns/1.0"> [1] the xf:input fields no longer
render. Try as I might, wherever I put the namespace declaration on the
form (and even if I add it to the xsltforms.xsl) the fields no longer
render. I have noticed that there is no reference to the TEI namespace
in the finally generated header, which I'#m guessing could be the
problem, but I've no idea how to get it there:
<html xmlns:xalan="http://xml.apache.org/xalan"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:ajx="http://www.ajaxforms.net/2006/ajx"
xmlns:txs="http://www.agencexml.com/txs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><!--HTML elements
generated by XSLTForms 1.5.5 (661) - Copyright (C) 2021 <agenceXML> -
Alain Couthures - http://www.agencexml.com-->.
I thought I'd be able to work around it by calling a src instance from
the main TEI namespace xml document, but this runs into the same
problem.
Any ideas about how I get round this (or do it properly in the first
place)!
Many thanks
Ralph
Links:
------
[1] http://www.tei-c.org/ns/1.0"> |