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

Re: Re: XPATH

Subject: Re: Re: XPATH
From: "poppe chris" <pc_poppe@xxxxxxxxxxx>
Date: Tue, 18 Nov 2003 22:57:19 +0100
xsd xpath
Hello,

first of all thanks to all the responses, but ive figured it out myself, the solution was the following:

<xsd:simpleType name="Sub">
  <xsd:restriction base="bs1:byteRange">
     <xsd:annotation>
        <xsd:appinfo>
           <bs2:length value="../mctf:SUBSTREAM_length"/>
        </xsd:appinfo>
      </xsd:annotation>
     </xsd:restriction>
 </xsd:simpleType>


This is all done in xml-schema but i'm using BSDL (an extension of xml-schema). This way the value of the bs2:length is equal to the value of the SUBSTREAM_length element. The problem was that i allways forgot to use the mctf: namespace,


greetings Chris
From: yguaba@xxxxxxxxxxxx
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re: XPATH
Date: Tue, 18 Nov 2003 13:42:42 -0200

Hi there, Chris.

Please don't be offended if I'm totally mistaken (which I may very
well be), but aren't you  confusing things here?

You seem to have two schema fragments and (from what I've understood)
want to  dynamically build a schema using an XSLT stylesheet. So why
do you say "similar to  the XPath in XSL" if you in fact want to
build an XSLT stylesheet?

Anyway, assuming that you want to build a stylesheet to produce
schemas, all you'd  need (for that specific bit of code) would be
something like this:

<xsl:template match="SUBSTREAM_length">
  <xsd:simpleType name="Sub">
   <xsd:restriction base="bs1:byteRange">
      <xsd:annotation>
        <xsd:appinfo>
           <bs2:length>
	  <xsl:attribute name="value">
                  <xsl:value-of select="."/>
              </xsl:attribute>
           </bs2:length>
        </xsd:appinfo>
      </xsd:annotation>
    </xsd:restriction>
  </xsd:simpleType>
</xsl:template>

Does this give you any useful ideas?

Cheers,

Erik


On 17 Nov 2003 at 18:02, poppe chris wrote:


> Hello,
> I'm facing the following problem, it deals with xpath but I really hope I
> can solve it withouth xslt (so maybe this isnt the right place to post it)
>
>
> I have the following code
> <xsd:element name="SUBSTREAM">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="SUBSTREAM_length" type="xsd:short"/>
> <xsd:element name="SUBSTREAM_interior" type="mctf:Sub"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
>
> and I want to add the following:
>
> <xsd:simpleType name="Sub">
> <xsd:restriction base="bs1:byteRange">
> <xsd:annotation>
> <xsd:appinfo>
> <bs2:length value="SomeXPathExpressionToSUBSTREAM_length"/>
> </xsd:appinfo>
> </xsd:annotation>
> </xsd:restriction>
> </xsd:simpleType>
>
> so i need help with that XPATH expression, cause i think its similar to
> the xpath in xsl no?


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


_________________________________________________________________
Volg Expeditie Robinson op de voet! http://entertainment.msn.be/tv/expeditierobinson/



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



Current Thread
  • Re: XPATH
    • yguaba - Tue, 18 Nov 2003 10:43:09 -0500 (EST)
      • <Possible follow-ups>
      • poppe chris - Tue, 18 Nov 2003 16:57:59 -0500 (EST) <=
      • poppe chris - Wed, 19 Nov 2003 14:22:16 -0500 (EST)

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.