Hi Alain, hi everyone,
I'm having trouble removing |xml:id| attributes with XSLTForms.
I can insert |xml:id| attributes, but I cannot delete them using
|xf:delete|.
As you can see in the attached example, other attributes are removed
correctly, but |xml:id| attributes are not. Is there something I'm missing?
I'm using XSLTForms 1.7, with Firefox and Chrome.
Many thanks for you help,
Josselin
|
|
------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="xsltforms.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" lang="en">
<head>
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover"/>
<title>Hello World in XForms</title>
<xf:model>
<xf:instance id="main">
<data xmlns="">
<item/>
</data>
</xf:instance>
<xf:instance id="source">
<data xmlns="">
<item ref="" xml:id=""/>
</data>
</xf:instance>
</xf:model>
</head>
<body>
<xf:trigger>
<xf:label>Add attributes</xf:label>
<xf:insert origin="instance('source')/item/@xml:id" context="instance('main')/item" ev:event="DOMActivate"/>
<xf:insert origin="instance('source')/item/@ref" context="instance('main')/item" ev:event="DOMActivate"/>
</xf:trigger>
<xf:trigger>
<xf:label>Delete attributes</xf:label>
<xf:delete nodeset="instance('main')/item/@xml:id" ev:event="DOMActivate"/>
<xf:delete nodeset="instance('main')/item/@ref" ev:event="DOMActivate"/>
</xf:trigger>
<br/>
<xf:output value="serialize(instance('main'))"/>
</body>
</html>
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support