Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Using relative sizes in your CSS for starters?
  2. What is that suppose to mean?
  3. boen_robot

    Navigation

    What do you mean by "navigation page"? A site map? Well, it's quite simple actually. Just have your menu data in some XML, transform it with some kind of XSLT and use ASP to execute that transformation. Example:xml <?xml version="1.0" encoding="utf-8"?><menu> <item> <title>Home</title> <link>#</link> </item> <item> <title>About us</title> <link>#</link> </item> <item> <title>News</title> <link>#</link> </item> <item> <title>Links</title> <link>#</link> </item> <item> <title>Images ></title> <link>#</link> <menu> <item> <title>Photos</title> <link>#</link> </item> <item> <title>Wallpapers</title> <link>#</link> </item> </menu> </item></menu> XSLT <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="navigation.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:output method="html" encoding="utf-8"/><xsl:template match="menu"><xsl:variable name="link" select="link" /><ul class="menu"><xsl:for-each select="item"> <li class="navlink"> <xsl:choose> <xsl:when test="menu"> <a class="hide" href="{$link}"><xsl:value-of select="title" /></a> <xsl:apply-templates select="menu"/> </xsl:when> <xsl:otherwise> <a class="navlink" href="{$link}"><xsl:value-of select="title" /></a> </xsl:otherwise> </xsl:choose> </li></xsl:for-each></ul></xsl:template></xsl:stylesheet> And the ASP from XSLT on the server example.With some CSS, the above could also be a menu (as it's root node implies). Infact, this is the XSLT of the first CSS only menu from cssplay. I'm having some difficulties getting the conditional comments for IE properly, but I'll do it soon hopefully.
  4. A much more speedy solution in my opinion would be for the database to contain the parts of the XML itself and the server side script would only have to assemble and/or transform the data there.
  5. boen_robot

    xml files

    Considering the fact that posting requres interaction with the user and the server, I think the classical approach for the server side scripted forum is better at this poing. Mostly for security reasons. Using XML for every item that doesn't need to be secured sounds as a good thing though. Think about every possible situation that the user might to with the fully accessable XMLs.
  6. The only way I can think of is to restructure the XML itself "manually". Instead of having <doctor><name><first>John</first><last>Smith</last></name></doctor> You could use <doctor><name first="John" last="Smith" /></doctor> And remove ALL line breakes and extra spaces. Example: <doctor><name first="John" last="Smith"/></doctor> But even this is not going to compress the data very much. Infact, that's the reason why XML was never ment to replace traditional databases such as MS Access, MySQL, Oracle and so on.
  7. The wrong is that you have used Data Islands which are supported ONLY in IE6 scince they are not part of any W3C specification, but only Microsft's. That's different from bilbob's problem though, scince the examples he gives use JS, which is more supported.
  8. What do you mean by "regular expressions"? Some kind of info? Anything?
  9. The first question: some kind of scripting. JavaScript that would manipulate a form perhaps?The second question: server side script is THE only solution. We are talking about a creation of a completely new file after all.
  10. If you look closely at your XPath expressions, you'll see the error. Doc is the root element of the document, so It's pretty obvious why this cycle repeats only once. I don't see much point of the list element though.If you are the creator of this XML (it's not generated by some application) I would suggest that you group your things to make them more easily accesable to the XSLT. Example: <list><host><name>hostname1</name><ip>192.168.1.100</ip><os>windows xp</os></host><host><name>hostname2</name><ip>192.168.1.101</ip><os>mac os x</os></host></list> With an XML like that, it's quite easier to set the XSLT to see what information belongs to which host so it could display each on a new row.Anyway, if this XML is generated by some application, I suppose I'll try to think of something else, but it would be quite messy, I know it.
  11. Technically speaking, even plain old HTML can't do this, so a plain XSLT won't be either. You need either a frame (bad idea) or a JavaScript that would hold the header on the top of the screen inside it's own frame.
  12. Actually, that part is correct. There must be a closing tag for the template element after all.The error I see is that you have used <xsl:value-of /> for the content. There should only be <xsl:apply-templates/> at that very spot.
  13. Place some kind of breackers in the XML file itself (why do you think the <br /> in HTML was invented for?) and then create an XSLT template with somethink like this: <xsl:template match="NameOfTheTagYouAreGoingToUseAsLineBreaker"><BR/> <xsl:apply-templates/></xsl:template> copyright: paetje
  14. In short: yes.To be more exact, you need the <xsl:sort /> element.
  15. boen_robot

    Images

    How about using a variable instead of attribute? <!-- Plaatjes --><xsl:template match="img"> <xsl:variable name="uri" select="@uri" /> <img src="{$uri}" /></xsl:template> Would this work?
  16. Considering the inconviniences that XSLT has over the plain XHTML, it's true that you need some server side language to... support it. XML based technologies are great, but the world is not entirely ready for them yet. By the time when IE10 comes out, they will be on their half way I think. So for any professional carrer, XML technologies are sure to come in handy for a large variety of purposes, but alone they are not much... yet.
  17. The only way I can think of would be for an XSLT that would create a schema from a predefined XML source that would serve as a model to the schema. In the XSLT you have IFs and CHOOSEs, so it sounds plausable. If there is a way with Schema itself, I don't know of it.
  18. "bandwidth" practically means the amount of data that is receiveed from a site. Images of cource take higher bandwidth scince an image file is larger then a text one. The same way, video files have a lot higher bandwidth and so on. Having optimized a site for low-bandwith would mean that you use text based technologies a lot more and you'll make them as compressed and small as possible.
  19. The simplest way to answer where to use XML in such project would be "Where do you NOT use a database to carry content?". At all of those places, you should use XML instead.It would be hard to use XSLT though, scince PHP doesn't have a built in XSLT processor. As I have said previously in this forum: if you know which extension exactly is requred for that and how to install it, please give some kind of instructions somewhere.Without XSLT, you would have to use PHP in it's place. But the code would get vast.
  20. Well, try theese things (a different host for starters) and then we shall see.As for the html extension. I meant the XML and/or XSLT. In other words: don't know. I haven't got such problems.
  21. Or if I could put it more simply:XML- data.XSLT or any server side scripting language- data to structureXHTML- structureCSS- presentation
  22. Most probably, google hasn't configured the XSLT MIME types, and because of this, Firefox (which cares about MIME types unlike IE) tryes to get the file instead of reading it.Try remaing your XSLT files with XML extensions. If that doesn't work... try using html extensions or something.
  23. I think it's more likely that they visit sites such as W3Schools and get the list from the menu .
  24. It's worth the effort in the end, but on the way, it will seem as it isn't.It's a great way to organize the site. I'm glad you actually realized the logic behind it. You can keep common data in one file. More specific data in other files and per page content in their own respective files. Download times will be reduced, scince the common data is cached the same way as CSS stylesheets are.The only drawbacks are that the page won't be accesable for browsers who don't support XML and XSLT, and you won't be able to validate your page scince it's not actual XHTML but XML styled with XSLT. The only way to avoid this is a server side script that would execute the transformation, but then you lose the data caching.
  25. Small correction(s): it's spelled XHTML .And yes. It depends what phones you are looking after. WML is supported by every internet enabled phone but it doesn't have much features. XHTML is supported by every MODERN phone with internet. You may use every XHTML scrict and every CSS as you would be doing on a computer screen, but you'll have to do it for small screens after all. Some BRAND NEW phones are even able to render other things such as SVG for example, but that's another story .
×
×
  • Create New...