Announcement

Collapse
No announcement yet.

Xpath Ausdruck im Stylesheet

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Xpath Ausdruck im Stylesheet

    Hallo zusammen,
    habe da ein Problem mit einem XPAth ausdruck- mein XML Dokument sieht folgendermaßen aus
    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <books>
      <book no="1">
        <publisher name="P1"/>
        <price>10</price>
        <title>T1</title>
      </book>
    
      <remark about="P1">
        <author>A1</author>
        <content>AAAA</content>
      </remark>
    
      <remark about="T1">
        <author>A1</author>
        <content>BBBB</content>
      </remark>
    
      <book no="2">
        <publisher name="P1"/>
        <price>20</price>
        <title>T3</title>
      </book>
    
      <remark about="T3">
        <author>A2</author>
        <content>CCCC</content>
      </remark>
    
    </books>
    In meinem Systesheet habe ich folgenden path eingebaut <xsl:apply-templates select="remark[normalize-space(@about)='P1' or 'T1']">
    damit möchte ich sagen, gib mir bitte die remark Elemente, deren attribut about entweder den wert T1 oder P1 hat.
    aber der funktioniert irgendwie, wobei ich nicht verstehen kann, wieso nicht?
    Hat da jdm. ne Idee?
    Dankeschön
    Zuletzt editiert von Jacky_flash; 10.06.2008, 17:29.

  • #2
    Präzisiere die zweite Bedingung:

    select="remark[normalize-space(@about)='P1' or normalize-space(@about)='T1']"

    Comment


    • #3
      funktioniert- danke

      Comment

      Working...
      X