|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] include, import trouble
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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








