Sorry for missing XSL ... here's the code...
explain: When using the attribute 'file' I'm loading the given xml document
and applying the content,
otherwise I'm using the numbering (section-title). In addition there's
creating an anchor for that section, and calculating the depth for
assign a stylesheet 'title' numbered from '0' to 'n'. At lease the
content gets applied. That's it.
<xsl:template match="section">
<xsl:choose>
<xsl:when test="string-length(@file) > 0">
<xsl:variable name="external-document"
select="document(@file)/xmldoc" />
<xsl:apply-templates select="$external-document" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="section-title">
<xsl:number level="multiple" count="section" format="1. "
/>
<xsl:value-of select="@title"/>
</xsl:variable>
<a>
<xsl:attribute name="name"><xsl:value-of
select="translate($section-title, ' ���', '_oau')"/>
</xsl:attribute>
</a>
<div>
<xsl:attribute name="id">title<xsl:value-of
select="count(ancestor::*[self::section])"/></xsl:attribute>
<xsl:value-of select="$section-title"/>
</div>
<div id="section">
<xsl:apply-templates />
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Regards,
Thomas
>Betreff : Re: Accessing an external XML within a XSL
>Gesendet: 09.09.03 07:45:26
>An : "OXF Users <[EMAIL PROTECTED]>"
>Von: "Erik Bruchez <[EMAIL PROTECTED]>"
>----- Original Message -----
>Thomas,
>There is no XSL in your example. That's the part that would help us understand
>your problem.
>-Erik
>Thomas Lehmann wrote:
>> Well,
>>
>> That's (example) my main document. My intention is
>> to include another xml (sub document)) as section parallel
>> to 'introduction' here...
>>
>> <xmldoc title="Main Title">
>> <section title="Chapter One">
>> <section title="Introduction">
>> <text>
>> This is an introduction.
>> </text>
>> </section>
>>
>> <section file="sub_document.xml" />
>> </section>
>> </xmldoc>
>>
>> That's (example) my sub document...
>>
>> <xmldoc>
>> <section title="An external document">
>> <text>
>> This is an external document.
>> </text>
>> </section>
>> </xmldoc>
>>
>> RESULT: As you can see next, the aspect "parallel" is well but the numbering
>> is "1." instead of "1.2" !
>>
>>
>> Main Title
>> 1. Chapter One
>> 1.1. Introduction
>> This an introduction.
>> 1. An external document
>> This is an external document
>>
>>
>> Can you get with it ?
>> Regards,
>> Thomas
>>
>>
>>
>>>Betreff : Re: Accessing an external XML within a XSL
>>>Gesendet: 08.09.03 19:33:58
>>>An : "OXF Users <[EMAIL PROTECTED]>"
>>>Von: "Julien Mercay <[EMAIL PROTECTED]>"
>>
>>
>>>----- Original Message -----
>>>Hi Thomas,
>>
>>
>>>I'm assuming that you are using the document() function in your XSL
>>>stylesheet, but I don't understand the numbering issue you are
>>>referring to. In which way is it wrong? Can you post a example with the
>>>expected and actual results?
>>
>>
>>>Regards,
>>>Julien
>>
>>
>>>Thomas Lehmann wrote:
>>>
>>>>Hi,
>>>>
>>>>accessing an external XML withing a XSL document works
>>>>well but I've a problem with the numbering. The numbering is
>>>>as if you've the external XML standalone but not (as needed)
>>>>relative to the actual node.
>>>>
>>>>Can I do that ? How ?
>>>>
>>>>thanks,
>>>>Thomas
>>>>
>>>>_______________________________________________
>>>>oxf-users mailing list
>>>>[EMAIL PROTECTED]
>>>>http://mail.orbeon.com/mailman/listinfo/oxf-users
>>
>>
>>
>>>_______________________________________________
>>>oxf-users mailing list
>>>[EMAIL PROTECTED]
>>>http://mail.orbeon.com/mailman/listinfo/oxf-users
>>
>>
>>
>>
>_______________________________________________
>oxf-users mailing list
>[EMAIL PROTECTED]
>http://mail.orbeon.com/mailman/listinfo/oxf-users
--
Thomas Lehmann
_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users