[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Function id() does not work XSLT - XML - XML-Schema

Subject: Function id() does not work XSLT - XML - XML-Schema
From: robhan@xxxxxx
Date: Fri, 20 Dec 2002 08:18:31 +0100 (MET)
xsl not function
Hello,
  
 Question: Why does the Function id() not work??
  
 Explanation: Each Fact has references to Dimension. I'd like to loop
 through
 all Fact and want to use refDim to get the corresponding Dimension or
 Dimension's. Attribute refDim is of type "IDREFS". Attribute id of
 Dimension
 is of type "ID"
  
 For me it looks like, that the xsl transformation does not know the
 schema.
 Correct? If yes, why?
 I have 3 parts which have to work together: XSD - XML - XSLT.
 Is somewhere a full example(not cutout's) for these 3 files which uses the
 id function?? 
  
 wkr
 robert
 ----- XSLT -----
  
 <?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <xsl:template match="/">
              ABC
              <xsl:value-of select="id('ID000000')"/>
              <xsl:for-each select="//Dimension">
                     AAA            
                     <xsl:value-of select="id('ID000000')"/>
                     AAA
                     <xsl:value-of select="."/>
              </xsl:for-each>
              DEF
        </xsl:template>
 </xsl:stylesheet>
  
  
 ---- XML -----
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml-stylesheet type="text/xsl" href="SpeedTest.xslt"?>
 <SpeedTest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="file:///....../SpeedTest.xsd">
        <Dimensions>
              <Dimension id="ID000000">
                     <DimensionValue>D0</DimensionValue>
              </Dimension>
        </Dimensions>
        <Facts>
              <Fact refDim="ID000000 ID000001">
                     <Value>FactValue0</Value>
              </Fact>
        </Facts>
 </SpeedTest>
 ---- XSD ----
 <?xml version="1.0" encoding="UTF-8"?>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:element name="SpeedTest">
              <xs:complexType>
                     <xs:sequence>
                            <xs:element name="Dimensions">
                                  <xs:complexType>
                                         <xs:sequence>
                                                <xs:element
 name="Dimension"
 maxOccurs="unbounded">
                                                      <xs:complexType>
                                                             <xs:sequence>
  
 <xs:element name="DimensionValue">
  
 <xs:complexType>
  
 <xs:simpleContent>
  
 <xs:extension base="xs:string"/>
  
 </xs:simpleContent>
  
 </xs:complexType>
  
 </xs:element>
                                                             </xs:sequence>
                                                             <xs:attribute
 name="id" type="xs:ID" use="required"/>
                                                      </xs:complexType>
                                                </xs:element>
                                         </xs:sequence>
                                  </xs:complexType>
                            </xs:element>
                            <xs:element name="Facts">
                                  <xs:complexType>
                                         <xs:sequence>
                                                <xs:element name="Fact"
 maxOccurs="unbounded">
                                                      <xs:complexType>
                                                             <xs:sequence>
  
 <xs:element name="Value" type="xs:string"/>
                                                             </xs:sequence>
                                                             <xs:attribute
 name="refDim" type="xs:IDREFS" use="required"/>
                                                      </xs:complexType>
                                                </xs:element>
                                         </xs:sequence>
                                  </xs:complexType>
                            </xs:element>
                     </xs:sequence>
              </xs:complexType>
        </xs:element>
 </xs:schema>

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.