Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Nothing really became clear. Linux interface, but a web interface. OK.1. But does that interface run on a stand alone server located at the user (for example, routers do that. They have their interface as HTML pages that are served when accessing the router via HTTP)?2. Or are all clients connecting to a remote site (the same way they would from a browser, but from an application)?3. Or perhaps the files are not running from an HTTP server, but only statically in the browser (where the "URL" will actually be a file path)?4. Or does it not run from a browser at all, but a stand alone application (if this is supposed to appear offline before anything else is installed)?Each of this environment presents different possibilities and constrains.1. Depends on what will be available to this stand alone server. If it doesn't have anything extra available to it, see 3. If it does, see 2.2. You can use many things. Practically everything. JavaScript to insert the data on the page without reloading, a server side scripting language (PHP, ASP(.NET), ColdFusion, Perl, etc.) to do the same on server checks (for example, if the data has to be saved). Or (the best option in my opinion, but might not be suitable for you) use variety of XSLT files- one for each format of the page (HTML, XHTML, SVG, etc.) and use the server side scripting language to execute the transformation and return the result to the browser. It's the XSLT file which will deal with the XML(s).3. Unfortunatly, the only thing you may use is JavaScript or XSLT over the XML. The later will requre a different XML file for each page + the extra XML file(s). The first is the only thing that can be "embed" in (X)HTML pages. If JavaScript is what you need, read the XML DOM tutorial.4. Use the language with which you've build the application. If built in C++, use a C++ based XML parser to access the desired XML nodes and use their data. One such example is Apache's Xalan-C.
  2. You get yours for free, because yours is enough for you. However, if you had 1000+ unique visitors per day, that might not be enough.
  3. I didn't understood what else did you wanted. Example?As for the above... hmm.... perhaps a "?" before the group to indicate it's optional: RedirectMatch temp \/?(?!maintenance\.html$) /maintenance.html or were "?" placed after the optional character/group like RedirectMatch temp \/(?!maintenance\.html$)? /maintenance.html
  4. Look at your "extension_dir" directive. The php_mysql.dll file must be in that directory. If not, simply set that directive properly. If PHP was installed in C:\PHP5 and the extensions were in the "ext" dir from there, the directive would simply be: extension_dir = "C:\PHP5\ext" If everything is OK, PHP should show information about MySQL in phpinfo().
  5. Opera also has WAP support btw. If you just shrink the window size, you might also get some ideas about how the content fits. In the worst case: at least you'll be able to see a rendered page.
  6. CSS tells the browser how to render a page. In order words: how will a page look.XSLT on the other hand takes one markup and turns it into another markup or text which is then rendered.The whole process is just totally different. Read the second answer from the XSLT FAQ.
  7. boen_robot

    Secure website

    That's not PHP's job. It's a server setup. If you don't believe me, look at the URL of a secure page. It begins with https://, not http:// as non secure pages do. And how the server machine handles different URL shcemes is configured prior on that machine, not on-the-fly by a server side script.In order to set up secure pages in... let's say Apache... you need to set up it's server configuration properly and I think you also need something like OpenSSL in order to make Apache run properly. But most importantly: you need to buy a digital certificate.
  8. I haven't really bothered about creating remote server connections, but if you want to edit and test locally, you need to have Apache installed. After that, setting up the whole deal is easy.
  9. Uhhh... say what? I think that's only your other post where you confuse W3S with W3C. But... even W3C isn't responsible for JavaScript. It's ECMA.
  10. Exclusion to this rule is if you're not sure about which server side scripting language you prefer and/or if such simply isn't available. But I'm not going to start my XSLT raid .
  11. boen_robot

    XQuery Problem

    By server side scripting languages, I mean not only ASP, but also PHP, Cold Fusion, Perl, etc. If your host doesn't support the one you like, it might still be possible to find a free host that does.Only server side scripting languages can do the editing. No way around it. Thank god for that too, scince client side scripts can be executed by anyone anywhere. Imagine if JavaScript could create new files on a server. Anyone would be able to occupy the complete space you have left. And if JS could delete files? God protect your files.You don't need XForms (note: forms != forums ) in order to create a form to edit XML, scince XML is technically speaking- text based.You can create a form (HTML form, XForm, or any other kind of form) with a few fields. For example "Title" and "Description". Then, when you submit the form, the server side script will generate an XML fragment like <item><title><!--Content that was entered in the "Title" field--></title><description><!--Content that was entered in the "Description" field--></description></item> and put that into the proper place of the complete XML file.
  12. Look at the source code of the page that is in the browser. Do you see the comments there? If so, then either you have some error in the include or the server is set to serve shtml pages as static html.After seeing the How To tutorial from Apache I can only suggest that your syntax is incorect. Use this: <!--#include virtual="/links.html" --> If you have control over the server, look at the article above as to how to enable SSIs.
  13. Perhaps use a RedirectMatch instead. For example: RedirectMatch temp \/(?!maintenance\.html$) /maintenance.html should redirect all requests, except maintenance.html to maintenance.html, thus eliminating the loop.
  14. Well, the XML equivalent, as you said it yourself is SGML. SoXML -- SGMLAs for XSLT and XPath... there are no equivalents. That is why XML languages are so successful. They make the work with XML a breeze, which in SGML was a big bother and because of the large specification- hard for implementors to implement. That is why there aren't much other SGML languages other then HTML.The only standart which helped SGML and has remained in XML is DTD. But even DTD doesn't expand all the possibilities of SGML, despite the fact it was created for it. And the XML equivalent of DTD (that was specially made for XML) is XML Schema.
  15. boen_robot

    XQuery Problem

    XQuery doesn't work this way. It doesn't work like anything similar either.You need to use XSLT in conjuction with XPath in order to turn the XML file into (X)HTML.And a program for editing... That's a bit harder. You'll need to create a form and a server side script that will do the actual editing.If it's only for news though, I suggest that you use RSS scince it's a standart vocabulary. Because of that, you may find existing editors for it.
  16. Huh. I wasn't really sure it will. Good! The predicate[. !='']works by selecting the current node (this is what the dot is for) and returning true if that node has a content, different from (the "!=") an empty string (the apostrophes).
  17. Odd... unless there were two WGS84 elements per road_traffic_message element. Isn't it always one?If there are more, but you always want the first one, try pointing the position in the for-each. That is: <xsl:for-each select=".//WGS84[1]/@*[. !='']">
  18. Perhaps something like this: <xsl:template match="//road_traffic_message"><tr><td> <xsl:value-of select="@message_generation_time"/> </td> <td> <xsl:value-of select="@severity_factor"/> </td> <xsl:for-each select=".//WGS84/@*[. !='']"><td><xsl:value-of select="."/></td></xsl:for-each></tr>
  19. See the first question of the XSLT FAQ.
  20. It all depends on the possible structures of the complete XML file. And what exactly is your desired output? Is the WGS84 element present when road_traffic_message is not or vise versa? Are they always on the same level? Are they grouped by pairs in any matter?
  21. If the server is set properly, a file that has the the shtml extension (for example "file.shtml") will not be sent to the browser "as is". Instead, the server will parse (simply put: "go over") it and look for the special commands (usually starting with "<!-- #" and ending like a comment- "-->") and execute them. The result after the execution of those commands will be given to the browser.The server uses "shtml" file extension for files containing such commands, so that it differs from a static HTML. That is, because static HTML is served faster. Otherwise, the server would have to always look in the file, even if there's nothing.If you have control over the server, you may also use another extension of your choise that would contain such commands.
  22. You need to create an application that will validate the XML file against the Schema. Most server side scripting languages provide this ability and if you need it off the web server, there are also desktop applications to do such validation. In any case, validation (today) is not done automatically when the file is parsed.
  23. Read the WAP tutorial. Putting a simple *.wml file in any normal web server (Apache, IIS, whatever) and connecting to it with a mobile phone is enough.
  24. "Data Island" doesn't mean displaying XML data on the web. It's a method made by Microsoft to embed XML data in HTML. It is really unsufficient, works only in IE and it's generally best to stay away from it.binding/mapping XML nodes (node = element or attribute) is most easily done with XSLT. It's possible, but harder with other languages, such as JavaScript. What DOM oriented environments are best suited for is adding, editing and removing nodes.It really matters what is the end result you're after, especially with JS, where the code can be really unreadable and/or hard to change.
  25. More like a different class for each "type" of image and use colors instead of images whenever possible. Also, use plain text for the menu's text, instead of images, etc.It's a general good design practice.Actually, you know what, I think I already know what your problem is. Transformiix (FF's XSLT processor) has a bug which enforces the use of the DTD in a higher priority then the method. So, <xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> Enforces XHTML's MIME type which in turn causes a different default behaviour as well as a few CSS different ones.This however only applies to the "html" method. "xml" method will instead show the XML source, even if there's a DTD and/or the media-type attribute present.To fix this problem, try downgrading the DTD: <xsl:output method="html" encoding="iso-8859-1" doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="http://www.w3.org/TR/html4/strict.dtd"/> Either that, or simply get yourself an XSLT processor on the server side (that's what I normally do).
×
×
  • Create New...