IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

Checkboxes and content Options · View
julian31
Posted: Thursday, May 2, 2019 12:47:56 PM
Rank: Member

Joined: 4/10/2019
Posts: 25
Hi, I try to display a table when a checkbox is checked by the user. To do it, I put the table in this condition: "if(document/visible)" ("visible" is the container of the checkbox), but it doesn't work.
Is it possible to display the content depending on a chekbox?
My version of the software is Altova StyleVision 2019 sp1.
Thank you

File Attachment(s):
FM.sps (19kb) downloaded 279 time(s).
test.xml (1kb) downloaded 245 time(s).
test.xsd (1kb) downloaded 243 time(s).


vlad
Posted: Thursday, May 2, 2019 12:59:02 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Of course, and your approach is correct - using Conditions. There is probably some error in your XPath

Attach here all your files for review
julian31
Posted: Thursday, May 2, 2019 1:07:01 PM
Rank: Member

Joined: 4/10/2019
Posts: 25
Done, I attached the .sps, xml and xsd files. the xml and xsd files are here just to test because I don't have the files yet.
vlad
Posted: Thursday, May 2, 2019 1:26:12 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Yes, there was an error in your XPath

Change the first to

document/visible = true()

julian31
Posted: Thursday, May 2, 2019 1:33:41 PM
Rank: Member

Joined: 4/10/2019
Posts: 25
Even with the change, the table is still visible in the HTML preview when I uncheck the chekbox
vlad
Posted: Thursday, May 2, 2019 5:22:05 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
That is clear - the check box is "alive" in Authentic View - when you click on it, Authentic will modify the XML value on the fly and this will render or hide the table

The HTML view is static and depends on the value of the XML node by the time of HTML generation
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.