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

include, import trouble

Subject: include, import trouble
From: target <target@xxxxxxxxx>
Date: Sun, 08 Jan 2006 18:18:45 +0100
html include import
hi, i have a problem with importing stylesheet or including templates.
no output is shown when i transform either with firefox or with php5.

I have a "xml1" datafile defined by a "schema1" an a "stylesheet1" to display it as HTML. this works all fine and is valid.
but when I created another "schema2" that basically defines a loop of the original entitity, and therefore uses the "schema1" namespaces and also created a valid "xml2" (defined only by "schema2") with many entities, Im not able to make a "stylesheet2" that uses the "stylesheet1" by importing it.
Im playing around but now I need help.
Some Code:
_____________________________________
"stylesheet1" which works fine
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="schema1.xsd" exclude-result-prefixes="xsi"
version="1.0" >
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="xsi:Single">
...
</xsl:template>
</xsl:stylesheet>
_____________________________________________
the "schema2" which also works fine and successfully uses the "schema1"
...
xmlns:paps="schema2.xsd"
xmlns:pap="schema1.xsd"
...
<import namespace="schema1.xsd"/>


<element name="Multible" type="paps:typeMulti"/>
<complexType name="typeMulti" >
<sequence minOccurs="1" maxOccurs="unbounded">
      <element ref="pap:Single" />
  </sequence>
</complexType>
</schema>
____________________________
"stylesheet2"  which wouldnt do what it should
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsi="schema2.xsd"
  version="1.0"
  >

<xsl:include href="stylesheet1.xsl"/>

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="xsi:Multible">
    <xsl:apply-templates select="xsi:Single"/>
</xsl:template>

</xsl:stylesheet>
_______________________________________
whatever I try importing and including "stylesheet1", it shows nothing (no error). seems like a simple thing - what is wrong?
when I copy only the template for xsi:Single as it is from "styleshee1" to add it manually to "stylesheet2" it works perfectly.
Is it because the element names are not recognized by the "stylesheet2" because the are definde in different schemas?


thanks for help.

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.