Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. DataIslands and XML with CSS are two completely separated ways of styling XML data.Embeding XML data with DataIslands(the <xml> tag) means to "bind" the ata inside the XHTML. It doesn't refer to styling it. The CSS file for the XHTML has "the honor" of styling the displayed data inside the XHTML page. Of course, this works only with IE but that's another subject.To style an XML with CSS means to style the XML file itself. This means that it will all be effective when the XML file is ran in the browser. Different transformations of the same document will apply their own respective styles.The fact that CSS styling in XML can't be carried to the XHTML page is the reason why CSS styling was never the future of XML styling. The best method is an XSLT page that would have a reference to external stylesheet that would style the transformed document.
  2. boen_robot

    Fixed Header

    This is probably an indication that your server doesn't support PHP. Or... I'm not sure actually. When I was failing trying PHP scripts I saw nothing everywhere a PHP script was used. For example: Hello. You are <?php echo "welcome"; ?> Would return "Hello. You are ".Just to ensure: ask your host if he has PHP support. It's really important that we know.You should also try this: <?php require("header.htm"); ?> All this SSI does is copy&paste the code from the specified page into the page it's used. Therefore, you must strip your included pages of their heads and bodies (excuse the pun ). I'm not sure if PHP scripts are allowed within the imported files.I'll wait a bit before making your header thing (though I could finish it in a few hours or a day mostly). As said above: SSIs are the better method in this matter.
  3. The reason for this lack of quality is the file format of the picture itself. It can only look good if you specify the original size. If you want a thumbnail of it, you should get some kind of image editor (PhotoShop, Fireworks, SnagIt, GIMP, etc.), resize the image with it, put the smaller version on the server. The img tag would call the smaller version. If this image is suppose to link to the full version of the image, the <a> tag would point to the full version. The only way around this would be a server side script that would do the resizing.
  4. Does anyone have ANY idea on this?
  5. For the sake of trying to solve this challenge, I was able to use few XPath functions. The only one which didn't worked was node-name() which is actually the ctutual one here. Both IE and FF say it's not a valid XPath function. Even adding the fn: prefix before it didn't work. It said that the namespace I provided(from the XPath referance) doesn't contain any XPath functions . <xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"><xsl:template match="/"><html><head></head><body><table><xsl:for-each select="/Pets/node()"> <tr> <td><xsl:value-of select="node-name(node())" /></td> <td><xsl:value-of select="current()" /></td> </tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>
  6. Normally, when people learn, they know that to use and manipulate a database, they need server side scripting. When they get in to the point of the tutorial, where there is SQL manipulation, they realize that SQL is a whole another language and start learning it THEN. This basically means they are aware on how should they set up a database to use with the particular server side script (scince it's explained in the server side script tutorial). It almost never goes the other way around.
  7. In addition to DarkElf's post I must say that if you place all of your lyrics on one page, you practically force the user to download them all before he/she is able to see anything. If you aren't "fighting" for maximum accesability and standart compilance, you could use frames with removed borders(so it doesn't get ugly). One for the menu, and one for the main content. Perhaps a third for the header.
  8. You should forget that method. It's only shown in the tutorial for learning purposes, not for usability ones.Use XSLT instead. It's the best (only?) way to transform XML data appropriately. Otherwise, as you said it yourself, it's just a plain text. Of course, XSLT is not exactly embbed into pages, so I must warn you that the you are entering a whole new world. Welcome to the light side of the force .
  9. The xmlns defines an XML NameSpace. In other words: defines that what you are using is that particularly pointed XHTML. the xml:lang attribute is the new equivalent to the lang attribute. Some (most?) developers use both to ensure compatability. the lang attribute specifies a language that is used in that element. This information could be used by screen reader to adjust their voice and/or vocablulary specifically for the pointed language. It could also be used by CSS for language specific stylings and perhaps there are few more uses as well.If there are portions of different languages in the same document, you must add the appropriate lang attribute to each portion.No. This attribute is NOT equivalent to the meta charset thingy. What the meta tag describes is this case is the Character set that is used. Each language may have few charsets used. Think of it like this: you may speak (for example) Italian or English, but you still use latin letters. You may speak Bulgarian or Russian but you still use cyrilic letters, etc. etc. etc.In short: a language's Alphabet is not the same as the language itself.
  10. Here is one of the many topics in which this has been discussed.
  11. If he is really to blame, don't forget to tell that. There are other people here who have the same problem. Like this one for starters. There also might be more...[edit] By the way, I made more posts today, then the whole week combined I think. All in the XSLT forum. This part of the forum is starting to get bussy. I feel warm inside when I think about it [/edit]
  12. What language you choose is up to you. When you learn it's basics and some of it's more frequently used functions, you'll also see how to add accounts into that database, so when the user has his account and password correctly, he would acces the content. One thing though. A tatabase does NOT cotain images. It can however, contain referances to them which the server side can use to find them. Read the ASP, ASP.NET and ADO tutorials and come here again if you don't grasp something. I would had recommended the PHP tutorial as well, scince PHP is THE most popular server side scripting language, but the tutorial is not as complete as the ASP ones.
  13. You already said it yourself(well...kind of): use a consistant naming scheme and their respective values, so XSLT could fill the whole thing without the need of XPath functions: <pets> <pet> <kind>cats</kind> <quantity>3</quantity> </pet> <pet> <kind>dogs</kind> <quantity>2</quantity> </pet> <pet> <kind>parrots</kind> <quantity>2</quantity> </pet> <pet> <kind>turtles</kind> <quantity>5</quantity> </pet></pets>
  14. There's no way to manipulate a database without the usage of a server side script(PHP, ASP(.NET), ColdFusion, etc.), so... yes... you need to know theese things well.
  15. Honestly, I'm out of ideas. This is not a code problem scince everything is working locally. Therefore, it's getting out of my competencse. Try asking the host if he knows anything about this. If he could register the mime type of xml and xslt or whatever...
  16. Oh no... not this problem again. Everyone is staring to have it... hm... try to put this right after the <xsl:stylesheet>: <xsl:output doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" method="html" /> I have no idea if it will work. The last few days this same problem has been bothering me as well.[edit] Another idea... try asking your host to register the XML and XSL mime types if he hasn't already done so.[/edit]
  17. boen_robot

    Fixed Header

    Ask your host if PHP, ASP(.NET), ColdFusion or any server side scripting language is supported. This is THE easiest way to do the things. It's actually also the one resulting in best performance in this matter (exeptions may occur if you use server side includes way too much).You can use this code to execute an XML and it's XSLT stylesheet inside an XHTML file. It would take some more time to load then with SSIs though. So it must be used wisely as well. The XSLT itself could contain another copy of the same JavaScript that would execute an inner XML and XSLT and so on, but again: longer rendering.I'm willing to make the XSLT and XML for you if you could give a link to your header page. If you later on decide to add something, you would only have to work inside the XML which is a lot easier than it might sound.
  18. boen_robot

    Hover

    It may be the biggest in terms of "the biggest company owner", but it's also the least supported one. Firefox has updates every few weeks(or monts? I'm not sure...) and IE has one every few years. Also, Mozzila are not afraid to add new things. Microsoft are afraid that old sites may start looking bad, people who use Firefox will increase, and they will lose the browser war forever (imagine a Windows with integrated Firefox in it ).
  19. I think I saw the most certain reason of the thing here... the html doesn't have a DOCTYPE on it. The XSLT is turning the XML into XHTML. There are probably some differences in how things render in quirks mode and in XHTML transitional mode.[edit] No problem. I'm not much of a professional either. I started learning all the stuff last summer [/edit]
  20. The only way around this which I can think about this is the following:1. Make an image of the whole header at one.2. Make a single table cell for it.3. Size that cell so it fits the full image.4. Place the image as a "background-image: url(background_or_whatever.jpg)".5. Place a div, span or whatever inside the table cell and write the "contact us" link there.6. Give the div,span or whatever a "float: right".
  21. The float property is exactly what comes great uder different resolutions scince it's putting the stuff on the top left/right corner of the container of the element .As for the picture problem... I'll look for it now, but I you should check if the code in the html and xsl is exactly the same. Any difference might be the cause for this.[edit=1]Hint: I also saw that only FF makes this problem. It all works fine in IE. Strange...[/edit][edit=2]Another hint: it only makes it with the XML file. When I preview the XSLT, there's no problem in both IE and FF.[/edit][edit=3]Could it be the tabular design itself?[/edit]
  22. boen_robot

    Fixed Header

    There are two ways of achieving this. Either store it in XML and XSLT and execute it with JavaScript or (the better solution in this matter)- use server side includes. The server side language will import the code for the header in every page and that's it. And as far as I know... frames are not allowed in strict XHTML.
  23. boen_robot

    Hover

    The code is the same as with the links(exept for the selector of course). The only problem is that IE doesn't support :hover on anything else besides links. Sorry.
  24. You forgot to post the code for the XSLT. After all, that's what caused the problem. Nevermind. It was in the zip anyway .This works, I tested it. The changes are in the XPath expressions selecting the news themselves: <xsl:for-each select="/news/entry"><table width="700" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <!-- Reading from news.xml //--> <div class="white12pxTahoma" align="left"><strong><xsl:value-of select="title" /></strong></div><br /> <div class="grey10pxVerdana" align="left"><xsl:value-of select="post" /></div><br /> <div class="grey8pxVerdana" align="right"><xsl:value-of select="author" /> ranted on <xsl:value-of select="/news/entry/date" /></div> <br /> </td> </tr></table></xsl:for-each> By the way... table designs s.u.c.k. . When you have some time to spare on redesign, try getting rid of the tables and replace them with CSS float, positions, demensions, etc.
  25. "mimetype" refers to the type="text/xsl" stuff. They are also specified in the server's configuration. I don't know exactly why they are needed and what's the difference but I know they are requred and IE doesn't care for them and that's why it shows them. By the way, is it me, or the XSL stylesheet doesn't have an XML prolog? I mean... <?xml version="1.0" encoding="ISO-8859-1"?>
×
×
  • Create New...