Jump to content

Scrier

Members
  • Content Count

    35
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Scrier

  • Rank
    Newbie
  1. I managed to make it validate with the following complextype: <xs:complexType name="paramtype" mixed="true"> <xs:attribute name="type" type="xs:string" use="required" /> <xs:attribute name="arraySize" type="xs:string" /> <xs:attribute name="length" type="xs:string" /> </xs:complexType> Problem here is that I cannot validate the element now.
  2. I have the following XML file that I have issues with validating a specific part of. <params> <param @type="int">intType</param> <param @type="char" length="5">tagString</param></params> I try the following schema to identify it but have issues with mixing attribute and restrictions. <!-- Complextype matching the "param". --> <xs:complexType name="paramtype"> <xs:restriction base="xs:string"> <xs:pattern value="[a-z]+([A-Z][a-z]*)*" /> </xs:restriction> <xs:attribute name="type" type="xs:string" use="required" /&
  3. Im looking to do a match template that I can loop up in until I find a specific node. The template I have atm looks like this: <xsl:template match="if|and|case|condition|sequence" mode="repetition"> <xsl:choose> <xsl:when test="sequence"> <!-- Do something else, we found the node --> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="parent::*" mode="repetition" /> </xsl:otherwise> </xsl:choose></xsl:template> And as you probably understand the xml is nested if, and, case, condition parameters that i need to go up thro
  4. I found out how to manage this with some trial and error. <!-- find each namespace element --><xsl:template match="element" mode="sourceMandatoryElement"> <xsl:choose> <xsl:when test="@namespace = 4014"> <xsl:apply-templates select="./element" mode="sourceMandatoryElement" /> <xsl:apply-templates select="." mode="sourceMandatoryElementIf" /> </xsl:when> <xsl:when test="@namespace = 4045"> </xsl:when> </xsl:choose></xsl:template><!-- handle if cases --><xsl:template match="element" mode="sourceMandatoryElemen
  5. Hello.I'm currently trying to make c++ code from xsl / xslt and making if cases from subelements and have made it to a certain extent so far but i'm currently stuck at one part.The xml is built up in the following way: <element namespace="4014" classname="002" id="_3"> <element namespace="4004" classname="012" id="_3_1" /></element><element namespace="4014" classname="001" id="_4"> <element namespace="281" classname="431" id="_4_1" /> <element namespace="282" classname="431" id="_4_2" /> <element namespace="4130" classname="007" id="_4_3" /></eleme
  6. Hi, Is it possible to decrease or increase the value of a number represented in an xml file with xsl? i.e I have the field <number>##</number>What I wan't to do is to get the string value of the above or below number value representation with xsl. I.e if the number was 15 I would like to get 14 or 16. // Andreas
  7. Thank you for that, it helped me to sort it out, apparently I was on message level so had to change to ./extrainclude instead of the whole search.
  8. Hi, I have the following xsl if case in a template called createHeader: <xsl:if test="messages/message/extrainclude">#include "<xsl:value-of select="messages/message/extrainclude"/>"</xsl:if> Problem is if I actually add the tag on this level it won't be added when I generate it.i.e
  9. Thanks alot. Will have to look into that one a bit more.
  10. Hi, I have a xml dokument with a couple of spans. in the following order: <span> <from>0</from> <to>23</to></span><span> <from>31</from> <to>31</to></span> And the issue I have with a call-template is how to make this into a proper if statement. If I only have one I can use this call <xsl:template match="span" mode="ifvalue"> <xsl:value-of select="from" /> <= value && value <= <xsl:value-of select="to" /></xsl:template> and it comes out as if( 0 <= value && value <
  11. Thanks alot for the help and idd it was way easier just to parse the data instead >_< some things is to easy to think of I guess
  12. Well I have some problems adding php code to be executed inside a news post. The newsposting looks like this: echo " </div> <div style=\"text-align: justify; padding-top: 1px;\"> ".$news['content']." </div> </fieldset> "; Works well and all and I can use html tags inside it to format the news. example : Netherspite<A HREF=/images/Kills/Karazhan/netherspite.jpg TARGET="_blank"><IMG SRC=/images/Kills/Karazhan/netherspite2.jpg WIDTH=600 BORDER=0></A> Now what I would like to do is to add in this news executable php code.. More exactly the follo
  13. Tried stripping away all "unceccecary" things (prolly stripped something I shouldn't) and got this: <html><body> <a onmouseover="return escape('will be 30 minutes late or so.');"><img src="images/note.gif" border="0"></a><script language="JavaScript" type="text/javascript" src="wz_tooltip.js"></script></body></html> Now this works on the old site but not the new site. explain this to me please old sitenew site
  14. Can post the generated code from the writeouts if it helps.This is the old site: <tr valign=top> <td bgcolor=#FFFFFF> <a onmouseover="return escape('<div class=\'wowitem wowitemlive\'><span class=\'iname\'><span class=\'purplename\'>Handwraps of Flowing Thought</span></span><br />Binds when picked up<br />Hands<span class=\'wowrttxt\'>Cloth</span><br />106 Armor<br />+19 Stamina<br />+19 Intellect<br /><img class=\'esock\' src=\'/images/yellowsocket.png\' alt=\'yellow\' /> Yellow Socket<br
  15. Well I've moved a site to a new host that is supposedly more stable than the last one we had, Although on the new site a return escape function has stopped working, think it's part of a wz_tooltip and I'm wondering why. I am guessing that some setting or something on the host is not up to date for some reason. The following example: <a onmouseover="return escape('This is a test')"><h1>ITEMS</h1></a><br> Does not give a mouseover at all and i'm wondering if anyone knows what might be wrong. Any help appreciated. (Note the code works on the old host but not the ne
×
×
  • Create New...