 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

May 19th, 2009, 03:46 PM
|
|
Authorized User
|
|
Join Date: May 2009
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
are you using HTA? HTA's don't have problem saving.
|
|

May 19th, 2009, 04:06 PM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Using HTA
I am embarrassed to say that I never heard of HTA before I saw this post. I have done a lot of work with xml and xslt but only from a read-only perspective. I am now in need of the ability to update my xml without going to a server and am trying to determine if this is possible. After finding this link I cut/pasted the example above and stumbled on to the permission error. I guess I am missing a piece and need to research HTA!
|
|

May 19th, 2009, 04:25 PM
|
|
Authorized User
|
|
Join Date: May 2009
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Please read this thread from the start. that might be helpful.
|
|

May 19th, 2009, 05:09 PM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Found my problem. Thanks!
I reviewed the threads and realized that my problem was not using the .hta extension on my hta file! It saves fine now. Great to find such an easy fix. Thanks again 
|
|

May 19th, 2009, 09:35 PM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Test Reply
Organizations deal with numerous documents, such as word processor documents and PDFs. These documents often reside on someoneâs computer and are not network accessible. Versions of documents are hard to track â the same document may be passed around using email in multiple versions over time. In large organizations it therefore becomes important to structure the flow of documents and present them in a common format. This is typically done using a DMS (Document Management System) such as the Document Library.
|
|

May 20th, 2009, 01:58 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
>I get a permission denied error
Frankly, I was surprised by the reply that suggested you could write to local client-side filestore at all - I would have expected this error. Presumably it will work if the user sets their security policy in the browser to something sufficiently low - but I would never recommend a user to do that.
In any case, we're now way off the topic of XSLT.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

May 20th, 2009, 08:24 AM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can you add/delete nodes via XSLT & hta?
I have the updated my prototype to allow a user to revise the attributes of an existing xml structure. Does anyone know if its possible to all add and delete xml nodes using the same strategy of an hta file? I appreciate any help with this. The last piece of my prototype.
|
|

May 20th, 2009, 08:36 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
|
|
With all the different participants in this thread it is hard to tell what "strategy" exactly you are talking about. The solution I posted in response to the original poster transformed XML to a HTML fragment with HTML form controls like input elements, where an XPath expression to the corresponding XML node was stored in the name attribute of the input element. Then event handlers of the input could then find the corresponding XML node using XPath and manipulate its content. If you wanted to remove a node instead you could do that with the MSXML DOM API e.g.
Code:
function removeNode(input)
{
var node = doc.selectSingleNode(input.name);
if (node != null)
{
node.parentNode.removeChild(node);
}
}
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
|
|

May 20th, 2009, 08:46 AM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Adding/Removing nodes
Thanks for the quick reply. Your example for removing a node seems straightforward and makes sense. I guess I am more concerned with adding a node since it is not already part of the xml. I am thinking this must be call like insertChildAfter() or appendChild(). If you can post an example I would appreciate it. 
|
|

May 20th, 2009, 08:54 AM
|
|
Friend of Wrox
|
|
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
|
|
MSXML implements the W3C DOM Level 1 Core/XML so yes, appendChild is a method to insert a node as a child of another node. See the MSXML SDK http://msdn.microsoft.com/en-us/libr...42(VS.85).aspx for details on all methods. So you can create an element with createElement and insert it into another node with appendChild.
As for an example, we would first need to establish how you would identify the element name of the element to be created and the target node to which the new element should be appended.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
|
|
 |