Re: XML Transformation Effectiveness.



Bucco wrote:
> I was actually looking for a server independant app like TiddlyWiki.
> TiddlyWiki uses Javascript, css, and html to generate a dynamically and
> saveable one file wiki without the need for a server. This allows the
> user to take the html document anywhere with them without being
> restricted to a server with server side scripts.
>
> The thing I want to do is very similar, accept I want to add an XML
> file to store data that is added through the HTML interface. The XML
> data can then be pulled back out and displayed through the HTML
> interface.
>
> Does this make sense?
>
> Thanks:)
>
> SA

If I understand correctly (and I'm not really familiar with much of
XML/XHTML), XHTML is a subset of XML. Hence, anything XHTML is by
definition also XML.

If this is the case, then the JS interface to the DOM should work
perfectly for your needs, with some minor divergences.

Use document.createElement to create a node, for instance.
document.appendChild to append the node as the last child of
another.
et cetera.

Use an external CSS file, imported using a <link> node, for
presentation.

As far as saving it, you can do one of two things:
1. Turn down security settings in IE for the local zone, then use the
ActiveX FileSystemObject to open a file and write the source of your
manufactured document to it.

2. Output the source in, say, a textarea, from which you can copy and
subsequently paste into a text editor and manually save.

Both ways are a bit kludgy, but what you end up with is a file that you
created from JavaScript, with source that acts as both XHTML and XML.

You can subsequently import it from the local filesystem using an
<object> or <iframe>, or access it directly. I don't think that
XMLHTTPRequest would work on the local filesytem, but it might.

You don't necessarily have to make it XHTML, I don't think, but I don't
see why you wouldn't.

Don't know if that helps any, but I hope it does.

.



Relevant Pages

  • Re: XHTML vs HTML
    ... XHTML pages correctly) what are the benefits to coding now with XHTML ... we're talking about XML here. ... the information that HTML doesn't cut it anymore is nuts. ... into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)
  • Re: XHTML vs HTML
    ... If you can't raionally argue why XHTML should or should not be persued and ... we're talking about XML here. ... the information that HTML doesn't cut it anymore is nuts. ... into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)
  • Re: insert text dynamically into textarea
    ... As I am sure you know, XHTML is XML. ... You can easily transform one flavor ... That is why I don't store static HTML. ...
    (comp.lang.javascript)
  • Re: XHTML vs HTML
    ... to be the predominant type of HTML used on the web for many years yet. ... First, it is XML. ... XHTML is also ... transformed using XSL from and into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)
  • Re: Unable to play .wax file using wm10 or wm11
    ... nearly all music was put on a streaming server in the last century, ... now is sufficient to use an ordinary html server in many cases. ... The code validates fully as xhtml 1.1 and as css on the ...
    (microsoft.public.windowsmedia.player)