Hi,
sorry for posting here, but i new here are some
people very familiar with XSLT and i have no experience with other lists and
don't know any XSLT-list. Hope its ok!?
OK, my problem is the following. I have this text
with several custom tags that i must tranform:
Part of my text.xml:
-----------------------------
<p>Mittelalterlicher
Bibliothekskatalog (MBK III/3, S. xxx-xxx)</p> <p></p> <p>M</p> <p>[M
1] Item ein predigpuch; das helt in im <MBK KatID="1">die außlegung
der<endnote>der vor acht
selikeyt verbessert aus die.
</endnote> acht selikeyt</MBK> und <MBK KatID="2">XV grad
rechter gedult</MBK> und <MBK KatID="3">XV czaichen rechter
diemutikeyt</MBK> und <MBK KatID="4">die außlegung des engelischen
gruß</MBK>, und <MBK KatID="5">wie darzu kum, das der mensch lang
nicht muͤg an todsuͤnd sein</MBK>, und <MBK
KatID="6">von dem gaistlichen krieg</MBK> und <MBK KatID="7">von
dem gaistlichen<endnote> nach
gaistlichen vor paumen
ist gestrichen: krieg.
</endnote> paumen</MBK> und <MBK KatID="8">von junckfrawlich
rainikait</MBK> und <MBK KatID="9">von dem leiden unsers
herren</MBK>, und <MBK KatID="10">wie ein mensch sein
creuͤcz auf sich nemen sol</MBK> und <MBK KatID="11">von
IIII vellen<endnote> vellen] viellen Hs. </endnote></MBK> und
<MBK KatID="12">ein predig 'Justum deducit'</MBK>, und <MBK
KatID="13">warumb unser herr sein V mynneczaichen behalten hat</MBK>,
und <MBK KatID="14">von peten</MBK> etc., <MBK KatID="15">sant
Paulus epistel 'Legt an euch einen newen menschen'</MBK>; von <MBK
KatID="16">den VII todsuͤnden</MBK> und <MBK
KatID="17">'Ave Maria'</MBK>.</p> <p>Das
vor geschriben puch ist uns worden von der junckfrawen Anna Grasserin und von
der junckfrawen Elspet Sailerin. </p>
What i need to do is, to extract those <endnote>-tags, which stand for "footnotes" replace them with a text-anker and a link, give them an ID and display all endnotes at the end of the page. The best example how this should look like is i give you an URL to see this live i think: http://iasl.uni-muenchen.de/rezensio/liste/Hausmann9783205775041_2603.html
Here you find an example text, with links to the footmarks at the end of the page, and there the footmark-texts and also a "back"-link to the main-text. The Problem is, i must work with this textes while they are very hugh and those tags are already there. I heard about that some textprogramms work with such <endnotes>-tags so it seems to be a often used way, but i have no idea, how i can achiev that with XSL, while this seems to be a very tricky one :-((
Hope that somebody here could help me! Thanks a lot! Regards, Marcus -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Marcus wrote:
Hi > sorry for posting here, but i new here are some people > very familiar with XSLT and i have no experience with > other lists and don't know any XSLT-list. Hope its ok!? You can use the XSL List at Mulberrytech. > What i need to do is, to extract those <endnote>-tags, > which stand for "footnotes" replace them with a text-anker > and a link, give them an ID and display all endnotes at > the end of the page. I'm not sure to understand what exactly your problem is, but if I do, the keepoints here are that generate-id() always generates the same ID when provided the same node (so you can reliably generate anchors) and using different modes to process twice the same node with different behaviour. For the number generation, uses xsl:number: <xsl:template match="endnote"> <a href="#{ generate-id(.) }"> <!-- Depends on your exact input format --> <xsl:number/> </a> </xsl:template> <xsl:template match="endnote" mode="footer"> <a name="{ generate-id(.) }"> <!-- Depends on your exact input format --> <xsl:number/> </a> <p> <xsl:apply-templates/> </p> </xsl:template> I think that should give you the idea. Regards, --drkm ______________________________________________________________________________ Stockage illimité de vos mails avec Yahoo! Mail. Changez aujourd'hui de mail ! -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Hi,
that helped somehow, but i don't know if the <xsl:number> functions right, while i'm always getting a "1" as link, and not a counting number :-( I searched a bit, but all i found is the using of <xsl:number> for creating a content-structer :-( But what i need is an increasing number "inside" my text for each <endnote>. and not on one place, so think i can't use the for-each-statement here, or can i? I think the problem is, that the counter doesn't know what to count, while it sees everytime only 1 <endnote>-tag, right? But i can't refer inside my endnote-template to the parent-node, while than i get the error message, that only childs or attributes are allowed... Any hints on that? The rest works just as i needed it, so the textankers and the endnotes at the end of the page function very well, thanks for that! Marcus ----- Original Message ----- From: "Florent Georges" <[hidden email]> To: <[hidden email]> Cc: <[hidden email]> Sent: Wednesday, June 20, 2007 3:58 PM Subject: Re: [ops-users] Just an XSLT Question about "endnotes" > Marcus wrote: > > Hi > >> sorry for posting here, but i new here are some people >> very familiar with XSLT and i have no experience with >> other lists and don't know any XSLT-list. Hope its ok!? > > You can use the XSL List at Mulberrytech. > >> What i need to do is, to extract those <endnote>-tags, >> which stand for "footnotes" replace them with a text-anker >> and a link, give them an ID and display all endnotes at >> the end of the page. > > I'm not sure to understand what exactly your problem is, > but if I do, the keepoints here are that generate-id() > always generates the same ID when provided the same node (so > you can reliably generate anchors) and using different modes > to process twice the same node with different behaviour. > For the number generation, uses xsl:number: > > <xsl:template match="endnote"> > <a href="#{ generate-id(.) }"> > <!-- Depends on your exact input format --> > <xsl:number/> > </a> > </xsl:template> > > <xsl:template match="endnote" mode="footer"> > <a name="{ generate-id(.) }"> > <!-- Depends on your exact input format --> > <xsl:number/> > </a> > <p> > <xsl:apply-templates/> > </p> > </xsl:template> > > I think that should give you the idea. > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________________________ > Stockage illimité de vos mails avec Yahoo! Mail. Changez aujourd'hui de > mail ! > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Florent Georges
Hi,
i could make it work at last. The last forum i found gave indirectly the answer. <xsl:number level="any" count="endnote" from="Inhalt" format="1"/> @level=any was the missing factor, not it counts every "endnote" in the subtree of "Inhalt", no matter where the endnote stands. Nice function :-) Thanks and regards, Marcus ----- Original Message ----- From: "Florent Georges" <[hidden email]> To: <[hidden email]> Cc: <[hidden email]> Sent: Wednesday, June 20, 2007 3:58 PM Subject: Re: [ops-users] Just an XSLT Question about "endnotes" > Marcus wrote: > > Hi > >> sorry for posting here, but i new here are some people >> very familiar with XSLT and i have no experience with >> other lists and don't know any XSLT-list. Hope its ok!? > > You can use the XSL List at Mulberrytech. > >> What i need to do is, to extract those <endnote>-tags, >> which stand for "footnotes" replace them with a text-anker >> and a link, give them an ID and display all endnotes at >> the end of the page. > > I'm not sure to understand what exactly your problem is, > but if I do, the keepoints here are that generate-id() > always generates the same ID when provided the same node (so > you can reliably generate anchors) and using different modes > to process twice the same node with different behaviour. > For the number generation, uses xsl:number: > > <xsl:template match="endnote"> > <a href="#{ generate-id(.) }"> > <!-- Depends on your exact input format --> > <xsl:number/> > </a> > </xsl:template> > > <xsl:template match="endnote" mode="footer"> > <a name="{ generate-id(.) }"> > <!-- Depends on your exact input format --> > <xsl:number/> > </a> > <p> > <xsl:apply-templates/> > </p> > </xsl:template> > > I think that should give you the idea. > > Regards, > > --drkm > > > > > > > > > > > > > > > > > > > > > > > ______________________________________________________________________________ > Stockage illimité de vos mails avec Yahoo! Mail. Changez aujourd'hui de > mail ! > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |