Re: [Xsltforms-support] hiding/displaying groups
Brought to you by:
alain-couthures
From: Alain C. <ala...@ag...> - 2012-07-10 19:12:22
|
Le 10/07/2012 15:32, Jens Østergaard Petersen a écrit : > The change came with 547. > > I will see if I can extricate a tiny test case from my mass of xquery. OK > > Trying to make one, I noticed that Firefox (up-to-date version on up-to-date OS X) treats the attached mods.2.xml file wrongly and Chrome treats it correctly, whereas mods1.xml is treated correctly by both. The way the namespaces are set makes the difference. > > This does not illustrate my original problem, however, and has nothing to do with 547. It's the namespace:: axis support issue in Firefox. The known workaround is to add, preferably at the document element, a dummy attribute such as mods:dummy="dummy". > The idea (which works before 547) is that if one of the named nodes is > missing, a panel should show up; this contains a number of buttons for > inserting missing nodes, each of which is displayed, by its own > xf:group, if its node is not present in the instance. If I understand > you correctly, you are checking the values of the elements and > attributes listed. You will catch if there is an empty value (which > will bring a '~~'). I am checking if the instance has nodes with the > listed names as child elements or attributes of the context node. I > will catch a missing node. I could condense my "or" expression if I > could use not(name(.) = ('a','b','c')). XSLTForms doesn't support XPath 2.0 yet ;-) Checking empty values vs. missing nodes is, of course, not exactly the same, depending on the context but missing nodes produce empty values in XPath 1.0! Thanks! -Alain |