Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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
  6. In short: yes.To be more exact, you need the <xsl:sort /> element.
  7. 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?
  8. 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.
  9. 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.
  10. "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.
  11. 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.
  12. 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.
  13. Or if I could put it more simply:XML- data.XSLT or any server side scripting language- data to structureXHTML- structureCSS- presentation
  14. 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.
  15. I think it's more likely that they visit sites such as W3Schools and get the list from the menu .
  16. 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.
  17. 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 .
  18. Actually, no. It requres some kind of extension before you are even able to run any code for the XSLT processor. I don't know what extension exactly is needed and how to install it. If you're able to figure it out by going through the manual or something, please let me know.
  19. I tryed using two of theese scripts today. Only the last one called gets rendered. How come ? I mean... they target different pairs of XMLs, XSLTs and containers (both divs), both are in their own files and called with the scr attribute of the script element. What could be wrong ?
  20. W3C has a Schema validator. However, they don't have XML or XSLT validators. The only way you could validate an XSLT would be to get it's XHTML output via server side scripting language and validate it instead.
  21. The order of the pseudo classes is wrong. It must be exactly like this to work: a:link {text-decoration:none; color:gray;}a:visited {text-decoration:none; color:gray;}a:hover {text-decoration:none; background-color:#C7C7C7;}a:active {text-decoration:none; color:gray;} That's why I prefer not to use the :link pseudo class. You can't go wrong with it.[edit] I think so Jonas... That's why as I said, I prefer not to use it .[/edit]
  22. See the source code of this page, and you'll see for yourself that it won't work. Entities are THE way to go.
  23. An important thing to note is that the method Jonas describes is going to style your menu through every page. However, if you want to change data, you would have to use some third language that would force a single data to appear everywhere. It could be a server side include, XSLT executed with JS and so on.
  24. Try to use "times" instead(notice the small starting letter). If not, you could always use serif instead. As far as I know, Times New Roman is generic serif font, but I'm not sure.
  25. boen_robot

    XML Link

    <HTML><xml id="cdRecord" src="record.xml"></xml><TABLE dataSrc="#cdRecord" cellSpacing="1" cellPadding="2" width="100%" border="0" height="70"> <tr><td><A dataFld="FullName" href="topic.asp?dataFld=&FullName"> Cannot link to King Manchester from record.xml </a></td><tr></TABLE></HTML> If it doesn't work, try making an empty span inside the anchor and apply the dataFld attribute to it instead.
×
×
  • Create New...