Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Well, I know that XML files work in every major browser, including Safari, or if not- at least Firefox on MAC. However, there might be problems with the JS. Are you able to preview the XML file's source tree in the browser? If so, the problem IS truly JavaScript and XSLT must be used instead.
  2. They are suppose to be a reference. A complete web site could use a variety of Languages, so it's not a good idea to force users into one path.
  3. Maybe IE6 might do it, or are we talking completely MACs?
  4. When variables are imported, they still have some order in the file itself, therefore, the callers would follow the order from within the file.From recent experiments I've done, I know that a variable's name can't refer to another variable, making impossible the thing you want.Another thing I wonder about: <xsl:variable name="skillname" select="[@name = 'name']/@value" /> I don't think that a path could begin with a predicate. I may be wrong though. Who knows...As for constructing the table... I'm still a bit confused of what is going on, but a table I recently helped with could be found here.Perhaps some adjustment of the XPath expressions might do what you want?
  5. boen_robot

    Changing IMG src

    First stop: not every XML file is a "feed".Second: entering every member's information is not good for performance reasons. SQL database could be better in this case.as for how to achieve this is XSLT. Simple: <xsl:variable name="src" select="imgsrc" /><img src="{$src}" />
  6. I don't get it... why do you need your own namespace on the first place? Can't you just use ordinary XML, scince there won't be any special technology applyed? Or am I wrong?
  7. I think turning them on is not going to turn on ASP. It's just going to enable you start and end PHP codes with % instead of ?php. I may be wrong though.
  8. JavaScript is totally not the answer. I can always turn my JavaScript and see the page OR look at the source code and copy the right URL.An .htaccess file could do it, but then again, a server side would be better.
  9. Add something like: <input type="submit" value="Go"> in the form element to get a Submit button. You may have some JavaScript to activate it.Also, the form must have the action attribute to point to a JavaScript funcion or a server side file to process the form.
  10. I'm not sure I want to know what the output of all this should look like .But I do see two small (yet significant) mistakes:1. The name of the variable is Feat and it's callers use $feat instead. That's wrong scince XML is case sencetive. Rename the variable to feat or rename the callers to $Feat.2. <xsl:value-of select=" ' ' " /> Is that even valid? If you are trying to select the current node, you could use a dot instead: <xsl:value-of select="." /> And if you want a space, you can just make a space instead of getting an emty value. An <xsl:value-of /> is suppose to contain an XPath expression or a variable.
  11. The way I see it, you've already figured it all (kind'a weird that I'm not sure where are we going ). The only thing you need is the format-number() function: <xsl:value-of select="format-number(current(), 0000#) /> This should output the number before the "," (in our case: the current node) with zeroes and a digit. The zeroes would be replaced by the correct number if the value is higher then 9, so there are no worries here .
  12. boen_robot

    xml and ie explorer 6

    I don't get it... it works in the tryit editor but...when you save the code on the left as note.html: <html><head><script type="text/javascript">var xmlDocfunction loadXML(){//Code for IEif (window.ActiveXObject) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load("note.xml"); getmessage() }//Code for Mozillaelse if (document.implementation && document.implementation.createDocument) { xmlDoc=document.implementation.createDocument("","",null); xmlDoc.load("note.xml"); xmlDoc.onload=getmessage }else { alert('Your browser cannot handle this script'); }}function getmessage(){var x=xmlDoc.getElementsByTagName("note")document.write(x.item(0).getAttribute("time"))}</script></head><body onload="loadXML()"></body></html> And have this XML file in the same folder: <?xml version="1.0" encoding="ISO-8859-1"?><!-- Edited with XML Spy v2006 (http://www.altova.com) --><note time="12:03:46"> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body></note> It should work .
  13. Summing the known spells is easy. Just use the sum() function: <xsl:value-of select="/node/node/sum(@name)" /> However, showing the node's name AND attribute would be a bit more difficult... perhaps variables? <xsl:variable name="node" select="node/local-name(current())" /><xsl:variable name="attribute-name" select="node/node/local-name(@*) /><xsl:variable name="name" select="node/node/@name" /><{$node} {$attribute-name}="{$name}">whatever</{$node}> I don't know if this would work... I'll try some other methods, but I think that variables are in some way the answer.
  14. Well of course you won't get ads. Who is going to pay for a host with ads?As for the host itself. If it has unlimited bandwidth it would be worth it even if there isn't PHP. If there is: great!I once saw a host with PHP support and unlimited bandwidth for $15 per year. I forgot them though. At that time I wasn't aware how hard is to find such a host and I wasn't aware of PHP's full potencial. Not to mention that my knowledge of HTML at that time finished with the presentation of the <b> tag .And the space... for me, atleast 50MB thank you . After all, I know free hosts that offer more, though they don't have PHP support and they offer subdomains .
  15. boen_robot

    SVG

    How about placing a transparent rectangle over the image (create a group and manipulate it's size and position to avoid emty places or unclickable parts) and apply the link ot it instead?
  16. boen_robot

    JAVA

    I think he refers to the JAVA applications which are normally embed inside pages with the <embed> tag, but scince it's deprecated, there should be another way.As fat as I know, the other way is the <object> tag, but I have no idea on how it should be adjusted for a JAVA application.
  17. It's a W3C reccomendation to use background-color and color together to ensure a text is always visible. Simply add "color: black;" to body and "background-color:inherit;" to .mainfont.I'm not sure about the second waring though. I don't know to which CSS property it refers to. Place your CSS properties on different lines and you are sure to see.
  18. Personally I height marketing terms. I think it would have had been much better if people could get a single tutorial in schools or universities on what marketing terms exist and what they include and then stop using them in their publications (like knowing "history", you know).Such terms include the above mentioned RIA, DHTML, AJAX and possibly some more .To me there are only pure languages and scripting/programming/graphic skills .The general languages that all involved in the web development should know are XHTML, CSS and XML. From then on, there are many different paths:Client side ways (in my point of view, that's the "light side of the force")- JavaScript, RSS, XSLT, and the other languages from the XML family.Server side ways (logically: "the dark side of the force")- PHP, ASP(.NET), JSP, CGI, Perl, Cold Fusion, etc.For a proffesional realization, one needs to know the basics, at least one client side way and at least one server side way. My personal choice currently in the client side realm is XSLT, along with some of the other XML languages, among which is RSS of cource. I still haven't chosen a server side way, simply because I'm teased of Cold Fusion, ASP.NET is somehow attractive and PHP... it has one major problem* for which currently I height it. And the others... they are even worse. However, in Bulgaria some people all refer to PHP as if it's the only way for server side scripting. Therefore, there aren't any ASP.NET and Cold Fusion hosts. I could always get an international host, but that could complicate thing I would otherwise be able to solve "personally".If by "web interface design" you meant graphical design, then what Skemcin suggest is truly it: Adobe Photoshop and perhaps a vector graphics editor such as Corel Draw or Adobe Illustrator.As for Flash. I personally height it and prefer SVG a lot more, scince I'm already fammiliar with XML based stuff. But I still have to admit that folks who decide "hey, let's build a web site" still refer to Flash as if it's the only option. Sad, but true.The best method for university plan in my opinion would be to have some kind of lecture to explain all of the language's possibilities, advantages and drawbacks and let the student decide for themselves. There's no right path TODAY. There will be once browsers support CSS3 completely along with all XML based languages. Until then: we can't decide what's the best path in the client side reaml at least. In the server side realm... never, scince they aren't browser dependant.*Doesn't have a built in support for executing XSLT transformations. Some kind of extensions are requred, but I don't know which and how to install. Even if I was able to install such extensions, most (all?) free PHP hosts would not bother installing extensions and payed ones... I have no idea, but I wouldn't like to take the risk.
  19. What if you replace the XPath expression in the string-lenght() with the current() function? <xsl:if test="string-lenght(current())!=0"> Would this work?And yeah, a more concret example of imput and desired output would make things easier.
  20. Come on people!!! Doesn't anyone have some kind of opinion about this, or is it just my bad luck with creating new topics ?!?!
  21. I would generally use definition lists when I have a group of something and I want to declare it. Example: <dl><dt>Validators:</dt><dd><a href="http://validator.w3.org/check/referer">valid HTML</a></dd><dd><a href="http://jigsaw.w3.org/css-validator/check/referer">valid CSS</a><dd><dl> With a bit of styling, you could make the dt appear... let's say on the left, and the links right next to it (floated) and it's structually better then an ul.But for navigation it's definatly better to use ul, scince nested lists (submenus) would structually and visually (without CSS) be better.I know we haven't mentioned anything about "ol"s yet, but just to avoid later asking, they are not good, because you can't know the order in which a user should look at your site. Or should I say it's not wise to do so.
  22. Before getting deep into your XSLT, I think I should try to give you a basic XPath way to navigate: <xsl:for-each select="//para"> <xsl:if test="para!= ' ' "> <para> <xsl:value-of select="para" /> </para> </xsl:if></xsl:for-each> This simply means that if para has any content, it would be outputted inside a para element, otherwise it's skiped. This is a simple kind of filter which I haven't tested, but I have seen it before in other XSLT stylesheets, so it should work.I'm not completely sure if that was what you were asking for, so if not, I guess I'll take it deeper .
  23. Of course there is. You are completely free to adjust the XHTML inside. It won't give any other results: <td class="data"> <xsl:for-each select="CPhone"> <xsl:value-of select="current()" /><br /> </xsl:for-each> </td>
  24. Not to mention that their HTML is ancient and you are suppose to use XHTML, right?Use big sites to see how NOT to do the things. Use smaller but standart compilant sites to see how you SHOULD do the things. See aspnetguy's site (spatterdesign) for instance .
  25. Maybe if you dwaw a prototype website on a paper or something and try achieving each of it's components one by one? Practise is the key I mean...
×
×
  • Create New...