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

RE: Question on parsing an encapsulated message

Subject: RE: Question on parsing an encapsulated message
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Fri, 13 Dec 2002 13:29:45 -0800
encapsulated message
Hi,

You will need to get the referenced schema.

You can do something like:

<xsl:template match="xs:include">
  <xsl:apply-templates select="document(@schemaLocation)/xs:schema/xs:element"/>
...

then it can use the same templates that match elements in your primary schema.

best,
-Rob


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Paul
> Sent: Friday, December 13, 2002 12:21 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Question on parsing an encapsulated message
>
>
> Hi
>
> Say my style sheet is for a schema(schema-1), but
> schema-1 contains a xs:include, refering to other
> schema's contents, will the style sheet deal with them
> directly ? How can I reach those contents ?
> Thanks for yr help
>
> Paul.
>
> ==== schema-1 ====
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> 	elementFormDefault="qualified"
> 	attributeFormDefault="unqualified">
>
> 	<xs:include schemaLocation = "clientGroup.xsd" />
> 	<xs:element name="cust-ALIAS"/>
> </xs:schema>
>
>
> ===== clientGroup.xsd(refer by above schema) ======
> <xs:schema>
>   <xs:element name="cust-info">
>   <xs:complexType>
>     <xs:sequence>
> 	  <xs:element ref="name" minOccurs="0"/>
> 	  <xs:element ref="email" minOccurs="0"/>
> 	  <xs:element ref="account" minOccurs="0"/>
> 	</xs:sequence>
>   </xs:complexType>
>   </xs:element>
> </xs:schema>
>
>
> ==== xsl(this is just testing how to reach
> clientGroup.xsd information)====
> <xsl:template match="xs:schema">
>   <xsl:value-of select="*/@name"/>
>   <xsl:for-each select="xs:element">
> name<xsl:value-of
> select="descendant-or-self::xs:element/@name"/>
> recognized.ref<xsl:value-of
> select="descendant-or-self::xs:element/@ref"/>
>   </xsl:for-each>
> </xsl:template>
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>



 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.