Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Look for any " " in your HTML file and remove them. Also remove normal spaces in cells. Turn <td>1 </td> to <td>1</td>
  2. I think making the jump from XML must be done with an analogy if you all don't mind .Think of a MySQL database like a single XML file. Each table in it could be represented as a child element of the root one. Each record (row) in it, as another element, and a field (column), as a final element, or to make it in figures: <database> <table id="members"> <record> <field id="username">Table 1, Row 1, Column1</field> <field id="password">Table 1, Row 1, Column2</field> <field id="something">Table 1, Row 1, Column3</field> </record> <record> <field id="username">Table 1, Row 2, Column1</field> <field id="password">Table 1, Row 2, Column2</field> <field id="something">Table 1, Row 2, Column3</field> </record> </table> <table id="customers"> <record> <field id="name" >Table 2, Row 1, Column1</field> <field id="adress">Table 2, Row 1, Column2</field> <field id="phone">Table 2, Row 1, Column3</field> </record> <record> <field id="name">Table 2, Row 2, Column1</field> <field id="adress">Table 2, Row 2, Column2</field> <field id="phone">Table 2, Row 2, Column3</field> </record> </table></database> You know that with XPath you can select a certain data field. For example /*/table[id='customers']/record/field[id='phone'] Will select all phones in the customers table.MySQL makes the database in a binary way and accesses them with an SQL query. Think of it like the XPath of MySQL. An equivalent to the avobe is (I think): SELECT phone FROM customers But SQL allows manipulation of data as well. Server side scripting languages do have XML writers though, but they don't use XPath, unlike MySQL which uses SQL syntax to manipulate data.Side note: XQuery is supposed to change that I think.Just learn the SQL syntax and PHPs MySQL functions. Scince you have some background in XML and understand the concept of a database, it will be easy to adopt it.
  3. The project discussion topic faded after being locked (no surprice) and people don't register in the other forum, either from lazynes (like myself) or because they are unable to find the discussion topic (now that I gave a link to it, that may not be the issue), and thus find the other forum.Another possiblility is that the project failed to a lack of working hand or due to the deadline. I knew 3 weeks is not enough for a forum, but people keep voting for it .
  4. Damn, I forgot this. How could I? Shame on me !To complete skym's reply, add a file in the image's folder called ".htaccess", open it and place the following content in it: <Directory /your-images-folder>Options All -Indexes</Directory> I would suggest that you put that inside your main configuration file though. Scince it's your own server and you have access to the configuration settings, there's nothing stopping you and besides, it's better for performance reasons.
  5. The two examples you gave are different. Skym showed you why. But ./folder/folder2/file.jpg and folder/folder2/file.jpg are equivalent.
  6. Having a valid and neat code is totally up to you. It's a matter of culture and experience. W3Schools can't teach all the principals.W3Schools and W3C are not related in any way. The name "W3" is abbreviation for "World Wide Web" and as you can see, it fits perfectly to "World Wide Web Schools" and "World Wide Web Consortium". It's not "reserved" in any manner, so there's nothing wrong in using it.I know the Flash page you're talking about. The code is not valid, but W3Schools hasn't said it is. Infact, they also have theese two notes: The first note is not misleading. That is truly the minimum code you need to make the code work across browses. Other techniques requre more code to work across browsers, or as Flash Satay requre an extra file.The second note is not misleading either. Dispite the fact that <object> is the standart element, Firefox and Opera use <embed> instead. They understand some objects, but not all. It's kind'a ironic those same browsers are known as "standart compilant".
  7. It's odd why some people don't bother to discover the possibilities of their browser.I don't know all of the things Opera and Firefox can do, but I don't use them as my primary browser, so I don't need to. I use IE7. Even in IE6 I knew everything it had to offer. IE7 has added a few new things, which I understood pretty quickly now too.It's not a "fix" when it's actually a "browser setting". I mean, there's nothing new here. There's not an extra file to add, a file to edit or anything. Just a setting, or in other words, a sequence of clicks in a premade GUI Application, that's part of the main application.Browser settings are optimized for consumers. Developers are expected to have the knowledge and courage to tweak the browser's settings, and as a developer, you really should digg into things before you give up.Did you know that in IE you can... ... alter some of the default styles? ... use a custom CSS file to view your pages with? ... turn JRE for IE off (if installed) and thus use JVM instead? ... even turn JVM off? ... have inline auto-complete? ... disable auto-complete for certain things (for example, if you want auto complete on URLs, but not on form components). ... print background colors and images? ... disable selected other add-ons (plug-ins) for IE? ... disable add-ons completely with a single setting? ... change the language in which you prefer pages, so sites can deliver more proper content to you? ... apply specifc secutiry settings for trusted (whitelist) sites, others for untrusted (blacklist) sites and third for other Internet sites (not in list)? I know, I know... Firefox and Opera probably had those things long before they appeared in IE. But the fact is that most consumers don't know theese thigs. And it's a pity some developers don't know either.P.S. Please don't tell me you don't know what JRE and/or JVM is.
  8. Unfortunatly, with CSS based layouts, adding a column is harder then realigning the stuff.But before you decide to turn your WordPress blog into a table based site, let me say that's the proper way to do things.I suggest you find yourself a new WordPress theme with 3 columns. I think there may be some.But 3 column layouts (in general) are called "The Holly Grail" of web design, because they are the hardest to achieve, yet the most desired ones.
  9. NOTHING showed up? Not even an error? Just a blank screen?Oh.. tough thing... hm... try it like this: <?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/msgboard"> <html> <body> <table border="1"> <xsl:for-each select="message"> <tr> <td><xsl:value-of select="topic"/></td> <td><xsl:value-of select="content"/></td> </tr> </xsl:for-each> </table> </body> </html></xsl:template></xsl:stylesheet> If that doesn't work, I don't know what code will. If it does, then you should report the previous code as a browser bug to Safari.By the way, if you're running the XML locally (not on a web server) check that Security settings don't forbid you to run "active" files locally. Such settings and their failing mechanism vary in browsers, which is why it may work in Camino.
  10. Simply disable the dir module. To do that, find the line: LoadModule dir_module modules/mod_dir.so and place a sharp (#) in front of it.Note that this will disable ALL directory listings and your users will be requred to explicitly type in the file names of the HTML files.To avoid this, put your HTML files in another directory, and in your configuration file add: If you want to avoid the need for an extra folder, you may create an alias for that folder, and with an .htaccess file, restore the proper URL on eah subfolder. The other way is to use mod_rewrite, but I'm too new to it to describe it right now. Not to mention that (as far as I'm aware) there's a performance hit with it.By the way, I barely understood what you want. You need to practice English a little.[edit] YES! YES! What I'm saying does exactly that! [/edit]
  11. Even if anyone was willing to help, you are using local file paths, making it impossible for your images to load. Remove your <base> tag. That's what messes the things up.
  12. Who says they don't give accurate info? Let him/her point the inaccurate info out, so it could be corrected.There are things W3School misses though. Some tutorials are too plain, when more info is to be expected. However, they only do that so you can grasp what's already there. You wouldn't like too much info at once, without assimilating it, right? Everything that's not mentioned in the tutorials can be found in the references.This excludes few things, but such missed things are not that hard to learn by other sources, once you know the main picture.
  13. I don't think so. this example uses a background color on the body, and an image on it too.
  14. It's a bit silly of me to ask a mod this question but... is there any reason why this doesn't fit the browser discussion topic?
  15. boen_robot

    need help in xml

    Well, you can make MS Word save you an XML file, which you can then transform with your own XSLT, but as usual, that XML file has a lot of crap, and transforming it into more straight XML would be a tough thing.Excel could import XML files and generate a Schema based on the XMLs structure, but if you import the XML file generated by MS Word, you'll get a lot of crap, because every node will be listed in the table.MS Access could also import XML files, but again, it makes a whole crap out of them. You need an XSLT that will transform the crap into a readable XML file, but considering the complexity of those Word generated files, I don't think I would be the one to write such an XSLT for you.Kind'a funny why one MS Application makes crap out of another MS Application's file.
  16. Pictures can be pulled directly by typing absolute URIs, instead of relative ones. <img src="http://w3schools.invisionzone.com/style_images/w3sbanner.gif"/> will display the forum's logo, no matter on which domain you're using it.As for data, SSIs can include the whole file, without doing anything to it. Scince you want only the data, there's a slightly different approach. Save the data as X(HT)ML. Then, from the other server, use an XPath expression on that document that will extract the appropriate data. For example, with an X(HT)ML of: <ul><li>Some data</li><li>Some more data</li><ul> The XPath expression "/ul/li[position()=2]" will show "Some more data". You can also use a database like MySQL, but XML based languages are the only ones supported across platforms.How to initiate that XPath query is another question though and I don't know the answer to this one. But I'm sure you can aim the query to a remote document.
  17. If you are using a server side scripting language to execute the transformation, then it doesn't matter if the user supports XSLT. The client only gets the (X)HTML output that way. And you are going to use such language anyway, scince you'll be building a CMS.
  18. The search box is still too big. I don't see anything in the CSS changes either. I think you don't need to add a class or ID though. IE7 supports attribute selectors, so you can do something like: input[name=quicksearch] {width: whatever suits you} Then again, I think there was a problem with forms that don't use IDs on their field, so you might want to add an ID too. At that point, it get's simpler and more cross browsery: #quicksearch {width: ...} After looking at the source code, I have some more notes. There's nothing visibly wrong with it, but there are still semantic errors, besides the validating problems:1. You are using inline links. I mean "<a href="...">...</a><br />". Use lists instead. That is "<li><a href="...">...</a></li>". Your #nav is the only thing using lists as carriers.2. A lot of other <br /> elements between divisions. Use margins in the CSS if you need extra space.3. You're also using empty <p></p> elements as spacers. Use margins!4. Your whole top box is semantically incorrect. Use lists for the menu and put the links inside each list item. Get rid of the whole <strong> element in it and use "font-weight" on the <li>s instead. You may want to remove the "|"s and use :before and/or :after with the "content" property. It won't work for IE6 and IE7, but it still looks nice. If you really need them, I suggest you use images that you load only for IE browsers.5. Your form looks really empty. How about putting some of the content from above in it as a group. Like this: <form action="http://www.biblegateway.com/quicksearch/" method="post"><fieldset><legend>Look up a word or passage in the Bible at www.biblegateway.com</legend><input name="quicksearch" type="text" size="17" /><input type="submit" value="Search Bible" /><fieldset></form> You're also going to need some clever CSS for that though, so be careful.6. The target attribute has been removed in strict XHTML. Use JavaScript instead. Oh and by the way, the only browsers you need to test on are different versions of IE, Firefox and Opera. Other Windows browsers use one of those browser's rendering engine, so it's pointless to test them.
  19. boen_robot

    divs

    Add "margin: 0;".By the way, rename the classes so they start with letters. Standart loving browsers choke at classes starting with numbers. Also, use classes for common things, or should I say "styles that apply to more then one element on a page" and IDs if the style is applicable to only one item in a page. In your case, this would mean: <div class="a" id="b">Somethings</div><div class="a" id="c">Something else</div> and a CSS: .a {height: 30px; margin: 0;}#b {float: left; width:20%;}#c {float: right; width: 80%;}
  20. Looks pleasent. What do you intend to use it for? A blog?Anyway... the only thing besides the quality of the images, already mentioned, is that in IE7, the search box is a little too big. It goes over the black line. If there isn't a min/max-width, I suggest you use it. IE7 supports it.And try to use a clean gradient, unless this grainy feel wasn't the intended effect.
  21. Try Tools>Internet Options>Advanced and check "Allow active content from CDs to run on my computer" and "Allow active content to run in files on my computer". Restart IE and try again. Theese setting apply only on the local file system. On the web, they don't.
  22. To ensure cross browser compatability. And by "cross browser" I refer also to compatability with Browsers that are not invented yet. A valid CSS with no hacks that works with all of today's browsers is also going to work with future ones. Invalid CSS may be treated differently across browsers, so validation is only the first step of compliance.
  23. What version of Firefox are you using? Both examples on the page you gave work on my Firefox 1.5.0.6.
  24. And here's the XSLT tutorial. You can use XSLT to extract data from the XML and turn it into XHTML, but you still need server side scripting in order to turn data, posted by the user, into XML and embed it in your existing one (or save it as a new one... it depends).
  25. As far as I'm familiar with, "background-color: transparent;" is the equivalent of not declaring a background color at all. However, as the people in the bug say, when it's explicitly written, the validator shouldn't return warnings, or if it does, the warning should be something other than "You haven't declared a background-color with your color".Here are possible combinations as to what will happen in different situations.HTML:<div id="a">This is an outer div<div id="b">This is an inner div</div></div> With this CSS: #a {background: url('background-image.gif') #000000; color: #FFFFFF;}#b {background: inherit; color: #000000;} The image is going to appear twice- once in #a and once in #b. If we suppose #b's background-color is seen along with the text, this result could make the text invizible.With this CSS: #a {background: url('background-image.gif') #000000; color: #FFFFFF;}#b {background-color: inherit; color: i#000000;} The image appears once in the outer div, but #b's background becomes black, thus covering the image. This result again, causes invizible text.With this CSS: #a {background: url('background-image.gif') #000000; color: #FFFFFF;}#b {background-color: transparent; color: #000000;} The image is shown once and a black text is shown without any background, thus appearing as if it's right over the outer div. This may be our desired result. If we suppose the outer div's background-color is visible where there is also text, this could still cause the text turn invisible, but unlike the second CSS, if the image doesn't do that, the text appears right.And here comes the most interesing CSS: #a {background: url('background-image.gif') #000000; color: #FFFFFF;}#b {background: inherit transparent; color: inherit;} This will apply the image on both #a and #b, but in the palces where there's no image, we'll see the corresponding part of the outer image or the outer div's background-color. The text will be kept white.You can see that "transparent" allows the user to explicitly achieve the same effect as to not declaring background-color, while still explicitly declaring it.
×
×
  • Create New...