xsl-list
[Top] [All Lists]

include, import trouble

2006-01-08 10:18:45
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.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>