[Xsltforms-support] How to access comments?
Brought to you by:
alain-couthures
From: Alexander H. <al...@ho...> - 2013-09-16 13:37:45
|
Hi all, i'm currently not able to access comments in a data instance (surely I'm missing a crucial point.) The example below gives me ReferenceError: comment is not defined Example: <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="no"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms"> > <head> <title>Acessing comments?</title> <style type="text/css"> body { font-family: sans-serif} label { display: inline-block; width: 8em; margin: 0 1em; text-align: right } </style> <model xmlns="http://www.w3.org/2002/xforms"> <instance> <data xmlns=""> <!-- Comment A --> <a>A</a> <!-- Comment B --> <b>B</b> <!-- Comment C --> <c>C</c> </data> </instance> </model> </head> <body> <xf:repeat nodeset="node()"> <xf:output value="string(.)"/> </xf:repeat> <xf:repeat nodeset="comment()"> <xf:output value="string(.)"/> </xf:repeat> </body> </html> Can someone please enlighten me? Thanks a lot, Alex |