Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About mbr

  • Rank
  1. <xsl:value-of select="/DATAPACKET/ROWDATA/ROW[@gruppe='lecker*&*fein']/@NAME"/> Mit der eckigen Klammer kannst du "Predicates" setzten , d.h. deine Auswahl einschränken. Du kannst z.B. bestimmte Attributwerte nennen oder einen Wert abfragen, also so etwas wie "immer wenn der Preis höher als 10 Euro ist" etc.Mit dem /@name wählst du dann lediglich noch die gewünschte Ausgabe....Die If Abfrage ist somit hinfällig, da du schon bei"value-of" entsprechend selektierst...
  2. Hey, maybe u guys can help me.I have a XSD wich contains different elements.These Elements contain some simpleTypes and some complexTypes. When i select one Element, i would like to display all complexTypes it contains... but how to do this?there is no attribute wich tells me if a item is complex or simple.... so how can i do it? example: <xs:element name="Order"> <xs:element name="Date" type="OurDate"> <xs:element name="Nr" type="OurNummbers"> <xs:element name="Body" type="OrderBody"> </xs:element> ______________________________________________________________ OurDate and OurNummbers are both simpleType Elements Orderbody is a complexType Element But how to detect that????? THANX!!! greets mario
  3. Hi there, in my other thread i was told to use xsl:params to solve my problem.See: http://w3schools.invisionzone.com/index.php?showtopic=46945. I am a starter and i have never worked with them before. I tried to teach my selve how to usethem, but it seems like i cant get it going. My goal was to use the param as a variable that passes a set ofstrings to the next template. With that, i wantet to check if a certain element was allready processed or not(by checking its "name"). See my other post.... But it seems like that my current problem is pretty basic.I declared my param global(?) at the toplevel stylesheet element.When i try to use it within my complexType template, i get the message posted in the title.I tried some things, but nothing works. My xslt book and google did not help either... Here is some pseudocode wich should give you an idea of what i am doing/trying: <xsl:stylesheet version="2.0" xmls:xsl......<xsl:param name="checkNames" select="_"/> <xsl:template match="complexType">...<xsl:variable name="cTName" select="@type">xsl:if "checknames" contains "cTName" -> do nothing!> else:<xsl:param name="checkNames" select="concat(checkNames, cTName)><xsl:apply a certain template....> Thanx for some input!
  4. ...ok i will try this out. Untill now i just worked with xsl:variables (wich act like constants), so it was not possible to string "names" together.Maybe it can be done with parameters.... i will see!
  5. Hi there,i am a xslt starter and i need some help - thanx in advance!My goal is to create a html-documentation of an XSD file. I just want to list allcomplexTypes/simpleTypes and their attributes in tables and add some comments.I just looped through them with a simple for-each statement and used the different templates.Everything works fine - bingo! What i am now trying to do is the same thing, but in an "recursive-ish" way.I do the following now: I pick my first complexType, process/display it and theni call the complexType template again for every complexType i find within it.And so on... Works fine! (Result of that is a different order, wich is kinda cool for my task - beyond that,ist a good exercise for me ;-) But my problem is, that some of the complexTypes are used in different places, and becauseof that, they will be displayed more then once. Not so cool...Therefore i would like to install a if statment that checks if the current Typewas allready processed in some place.But i dont have a clue how to do that in xsl... I would need something like a list, in wich i storeall the complexType - "Names" wich i have allready used and then compare the current name with that.But it seems that there are only constants in xsl...I hope my question is clear! If you need a example/code or whatever, let me know Thanx for some Input!mario
  • Create New...