Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. 80% in sub2 and 20% to sub1?[edit]posted similtaniously with pulpfiction [/edit]
  2. By the way:background-color:green;notbackground-color=green;
  3. XML only carries "ordinary" data. You could however mark the things that are superscripts:<text>2<superscript>2</superscript>=4</text>And then use some XSLT with proper CSS to adjust the sisez and positions .
  4. I added the select attribute to ensure that this would work if there are other things in the XSLT. However, if that's not the case, you can simply remove the select attribute. This would apply ALL templates if only they have appropriate matches inside. This could make the things unstable if not used wisely, but if you have a single XSLT containg only all skills, then you don't need the select attribute and you can remove it without any worries in the short and long term.
  5. As far as I know, nested templates are not allowed. You could use <xsl:call-templates/> element though. Adding attribute "select" would activate the desired template at that spot.I almost see where this is all going. Perhaps the unclear XSLT is the only thing that confuses me now. Here's an altered version of the code: <xsl:template match="skills"><xsl:for-each select="skill"><xsl:apply-templates select="Sense Motive" /></xsl:for-each> </xsl:template><xsl:template match="name" name="Sense Motive"/> <xsl:variable name="Sensemotivemisc" select="modifiers/modifier[@name = 'misc']/@value" /> <intvalue name="sensemotivemisc"> <xsl:value-of select="$Sensemotivemisc"/> </intvalue> <xsl:variable name="Sensemotiveranks" select="modifiers/modifier[@name = 'rank']/@value" /> <intvalue name="sensemotiveranks"> <xsl:value-of select="$Sensemotiveranks"/> </intvalue > <xsl:variable name="Sensemotivestat" select="modifiers/modifier[@name = 'ability']/@value" /> <intvalue name="sensemotivestat" <xsl:value-of select="$Sensemotivestat"/> </intvalue> </xsl:template> I haven't tested it, but if all is correct, it should work.If you want to ensure priority you could use the "priority" attribute of the xsl:template. Just use integer value in it to specify which should have a higher one.
  6. I haven't seen that XMetal, but from what I understand, the application automatically generates a schema for the XML file, so it could force you to write valid code. Is there some window like that? If so, could you manually edit the schema? If you could, you could define the new element as valid in the schema and then feel free to use it everywhere in the document.
  7. http://www.w3schools.com/site/site_search.aspSays enough
  8. Most companyes want a CV when you apply for a job. You can easily say "x ears of experience. A detailed list of previous clients could be found at www.yoursite.com/portfolio. Some of them include:..."So, a freelancer is judged by his/her work, not by what he/she points as a years of experience and a web design worker is judged by the number of years.
  9. There are always meta redirects if that's what you want, but this could "break" the back button. <META HTTP-EQUIV=REFRESH CONTENT="1; URL=http://www.example.org/bar">
  10. I can't suggest much without knowing the full server side's system... hmm...A thing you might do, would be to add an attribute to each menu about which group should have acces to it. Example: <menu> <item access="admin"> <title>Site control panel</title> <link>http://example.com/admin/</link> </item> <item> <title>Home</title> <link>http://example.com</link> </item></menu> Then use the server side script to generate only the menus that have the corresponding attribute(s). You may use XSLT too, but there's a tricky point here for dealing with security. Hmm... you may use the server side to generate the appropriate XML and apply a fixed XSLT that would render the menus there.Again... nothing is certain. There are many ways to do the things, but it all depends on the rest of the system.
  11. 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.
  12. 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.
  13. Maybe IE6 might do it, or are we talking completely MACs?
  14. 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?
  15. 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}" />
  16. 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?
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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 .
  22. 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 .
  23. 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.
  24. 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 .
  25. 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?
×
×
  • Create New...