Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by boen_robot

  1. The proper order is to have the PI ("Processing Instruction"; the "<?" thingy) before the root element.Also, for a validator to recognize your declarations, the namespaces everywhere need to match. In this case, your elements are not in a namespace, so the "noNamespaceSchemaLocation" is the proper attribute to use, i.e.

    <?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="prob12.34d.xsl"?><ArtistListxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="prob12.34d.xsd">

    You're not supposed to see both the data and the formatted HTML... The PI is used exactly to tell the browser to hide the data in favor of whatever the result of the XSLT transformation is (which in your case is an HTML page, but could be an SVG instead for example).Also, no browser does either DTD or Schema validation, so you're not going to get any schema related errors in a browser. For that, you'd need to use the server. e.g. PHP's DOMDocument::schemaValidate() which, as you might be guessing, ignores your XML declaration too. So what's the point of that declaration you ask? IDEs - they can offer you auto completion based on the declared schema, and some can even validate your document "on the fly", and tell you an element is invalid at that location as soon as you write it out.

  2. The problem with putting up "a rocket up their support staff" is that we're not the owners, and that's the only one who they respond to.

    perhaps you might know if there are any threads on the D&D software called eTools and writing XSLT templates for it?
    I don't. Sorry.
  3. You don't need either DTD or XSD to render XHTML from an XML document. XSLT is enough.DTD or XSD is needed to validate the grammer of an XML document. To actually perform the validation, yes, you need to use a validator.The order I'd advice is XML, (XSLT & XPath), (DOM & XPath), XSD, DTD. XPath needs to be studied together with XSLT and/or DOM, because it doesn't make sence in a vacuum. XSLT on the other hand can't really do anything without XPath. DOM could, but having the "node sence" that XPath provides helps.As for attributes - an attribute can occur once per element, and can't have any children other than its value. If you have a scenario where this is enough (e.g. specifying a URL of sorts, a "flag" of sorts, etc.), an attribute is a perfect thing to use. In all other instances, an element is more appropriate.

  4. The default is the highest supported by the XML parser.The main difference between 1.0 and 1.1 is in what's allowed as tag names - XML 1.0 only allowes a certain (very large!!!) range of printable characters, while XML 1.1 only forbids a certain (very small) range of characters that are either already special (e.g. "<" and ">") or are reserved for potential future expansions (e.g. "{" and "}").There's almost no other difference, which is why you don't see many users use it, and in turn, fewer parsers for it.

  5. You could invert the conditon - always display the start date, and if the dates are NOT the same, display the end date as well, e.g.

    //Do whatever you do to "show" the date e.g. "echo $event->StartDate;"if ($event->StartDate !== $event->EndDate) {//Do whatever you need to do to also "show" the end date, including outputting a separator, e.g. "echo '-', $event->EndDate;"}

  6. This is supposed to be an overly simplified example... not to be used "for realz".How to fix this should IMHO be explained in later tutorials, but as far this one is concerned - it poses no danger to W3Schools' server, nor can one user touch another, so it's fine.

  7. Nah, recent ApacheLounge binaries use ".so" files indeed.The first error message appeared because you have another program running on port 80. This could be another Apache installation or it could be Skype. If you have Skype, shut it down, and then start Apache with port 80, or (as you've already done) make Apache use a different port.As for the error about loading the module... How does your httpd.conf file look like? I don't mean the whole... just... how does the line where "mod_access" appears look like?

  8. It might help to illustrate this with a slightly more complex HTML:

    <div class="myDiv"> </div><div class="something"></div><div class="something"></div>

    If you have a selector that says "div", you apply the style to all of the elements above (since in the above example, they're all divs). The selector ".myDiv" would apply only to the first div, and ".something" would apply to the second and third elements.

  9. XAMPP is an "all in 1" installer.If you want to install the components separately, get the Apache Lounge binaries for Apache (the 32 bit), and also get the mod_fcgid binary. Installation instructions are within the zip files.For PHP, the Windows binaries can be found at a separate subdomain of php.net. For Apache, you need the "VC9 x86 Thread Safe" zip file. Installation instructions can be found at this page of the manual.For MySQL, get and follow the instructions of the MySQL installer.To make PHP "see" MySQL, check out this page of the PHP manual.

  10. AFAIK, it uses the same techniques like any other sites, i.e. it goes from the front page, and follows all links, regardless of whether they point to the same file with different parameters, or different files.In terms of what's placed higher on results, different files would be placed higher, regardless of whether they're through a sitemap index or "naturally" gathered.

  11. If it's an off topic that has indirectly to do with web development/design, we may allow it, and occasionally have done so.But if something is completely unrelated, we're locking it out right.Examples of things that, despite me liking them, I'd close off for being off topic: Computer games, Yu-Gi-Oh! (everything...), Sonic The Hedgehog (everything...), cats.... oh, and if someone starts going "me too", you'll force me to lock this topic :lol: .

  12. It parses only the included file.But keep in mind that parsing a file you're not using can sometimes be faster than including the file conditionally, especially if your check requires a lookup in a file or database.So make sure to minimize such checks, or better yet - actually benchmark how much each option affects you.

  • Create New...