You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am splitting this off of the other issue i raised. You responded by suggesting that i transform the xml after adding a reference to the xsd. But the xsd file is not part of the deployed application. The goal is to deploy just the generated HTML file with additional js file and let the user create/save/load different XML files by filling in the generated HTML form.
In any case, what i am doing is using the htmlToXml function to create the XML from the form contents and saving this in some user-specified file. Then I am letting the user choose a previously saved file to be loaded into the HTML form.
So the xsd -> html transform only happens once, essentially on an empty xml document, i.e., with just my xsd file. My document has 2 sequences each of which contains subsequences demo-skiier-ref.txt
(note: .xsd copied as .txt file)
When the user selects a file i parse the file into an XML document (which obviously needs to be one created from the HTML form being displayed). I then pass this xml document to parseNode to have it populate the HTML form. The js code generated from js/html-populators,xsl (~line 163) does not recreate all of the nested sequences and fill them with data.
the code if (childElement.parentElement.lastElementChild.nodeName.toLowerCase() === "button") { button = childElement.parentElement.lastElementChild; } else if (childElement.parentElement.parentElement.parentElement.lastElementChild.nodeName.toLowerCase() === "button" && !childElement.parentElement.parentElement.parentElement.lastElementChild.hasAttribute("data-xsd2html2xml-element")) { button = childElement.parentElement.parentElement.parentElement.lastElementChild; } if (button !== null && **childNode.nodeName === previousChildName**) { clickAddButton(...)...
does not seem to work for nested sequences, just for the outermost sequence element is created but none of the inner sequence elements are created and populated.
Seems like the check for nodeName === previousChidName is not quite correct.
The text was updated successfully, but these errors were encountered:
I am splitting this off of the other issue i raised. You responded by suggesting that i transform the xml after adding a reference to the xsd. But the xsd file is not part of the deployed application. The goal is to deploy just the generated HTML file with additional js file and let the user create/save/load different XML files by filling in the generated HTML form.
In any case, what i am doing is using the htmlToXml function to create the XML from the form contents and saving this in some user-specified file. Then I am letting the user choose a previously saved file to be loaded into the HTML form.
So the xsd -> html transform only happens once, essentially on an empty xml document, i.e., with just my xsd file. My document has 2 sequences each of which contains subsequences
demo-skiier-ref.txt
(note: .xsd copied as .txt file)
When the user selects a file i parse the file into an XML document (which obviously needs to be one created from the HTML form being displayed). I then pass this xml document to parseNode to have it populate the HTML form. The js code generated from js/html-populators,xsl (~line 163) does not recreate all of the nested sequences and fill them with data.
the code
if (childElement.parentElement.lastElementChild.nodeName.toLowerCase() === "button") { button = childElement.parentElement.lastElementChild; } else if (childElement.parentElement.parentElement.parentElement.lastElementChild.nodeName.toLowerCase() === "button" && !childElement.parentElement.parentElement.parentElement.lastElementChild.hasAttribute("data-xsd2html2xml-element")) { button = childElement.parentElement.parentElement.parentElement.lastElementChild; } if (button !== null && **childNode.nodeName === previousChildName**) { clickAddButton(...)...
does not seem to work for nested sequences, just for the outermost sequence element is created but none of the inner sequence elements are created and populated.
Seems like the check for nodeName === previousChidName is not quite correct.
The text was updated successfully, but these errors were encountered: