Re: [Hypercontent-users] element ordering
Brought to you by:
alexvigdor
From: Alex V. <al...@bi...> - 2007-08-14 14:33:07
|
Hi Carl, Try something like this <xsl:apply-templates select="/cms:wrapper/cms:source/page/child::* [(name(.)='rightbox') or (name(.)='selftagbox')]"/> That should preserver order. Cheers, Alex On Aug 14, 2007, at 8:54 AM, Carl P Barrow wrote: > Hi Alex, > > That works great when you are adding them. How would I get them to > display in that order. I currently get he rightbox elements and > then the selftag elements because of the following code: > > <xsl:apply-templates select="/cms:wrapper/cms:source/page/rightbox"/> > <xsl:apply-templates select="/cms:wrapper/cms:source/page/ > selftagbox"/> > > Cheers > CArl > > ************************************* > > Carl Barrow > Systems Integrator > e-Services > The University of Hull > Cottingham Road > Hull > HU6 7RX > Ext. 6838 > > ************************************* > > > > > -----Original Message----- > From: Alex Vigdor [mailto:al...@bi...] > Sent: Tue 8/14/2007 13:31 > To: Carl P Barrow > Subject: Re: [Hypercontent-users] element ordering > > Hi Carl, > Give this a shot: > > <!ELEMENT page ((rightbox|selftagbox)*,bodytext,rawhtml,leftbox*)> > > Cheers, > Alex > > On Aug 14, 2007, at 5:46 AM, Carl P Barrow wrote: > > > Hi Alex, > > > > I'm not sure if what I want to do is possible but I thought I would > > ask your opinion. > > > > I have two element 'rightbox' and 'selftagbox' the idea is that > > users can use the rightbox element if they want to have the content > > formatted in a standard way, if they want to change things they can > > tag it up themselves using the 'selftagbox' The way I have set > > things up mean that the 'rightbox' elements are displayed and then > > the 'selftag' elements underneath and it isn't possible to mix them > > up in the editor when adding them. Is there a way to allow users > > to add 'selftag' boxes and right boxes in any order and then have > > then displayed on the page in that order? I've included the > > relevant bit of code below. > > > > Cheers > > Carl > > > > <!ELEMENT page (rightbox*,selftagbox*,bodytext,rawhtml,leftbox*)> > > <!ELEMENT rightbox (html)> > > <!ELEMENT selftagbox (html)> > > > > --------- > > > > <xsl:template match="rightbox"> > > <div class="box1"> > > <h2><xsl:value-of select="@title"/></h2> > > <p><xsl:apply-templates select="html"/></p> > > </div> > > </xsl:template> > > > > <xsl:template match="selftagbox"> > > <xsl:apply-templates select="html"/> > > </xsl:template> > > > > --------- > > > > <xsl:apply-templates select="/cms:wrapper/cms:source/page/ > rightbox"/> > > <xsl:apply-templates select="/cms:wrapper/cms:source/page/ > > selftagbox"/> > > > > > > > > > > ************************************* > > > > Carl Barrow > > Systems Integrator > > e-Services > > The University of Hull > > Cottingham Road > > Hull > > HU6 7RX > > Ext. 6838 > > > > ************************************* > > > > > > > > > ********************************************************************** > > ******************* > > To view the terms under which this email is distributed, please go > > to http://www.hull.ac.uk/legal/email_disclaimer.html > > > ********************************************************************** > > > *******************--------------------------------------------------- > > ---------------------- > > This SF.net email is sponsored by: Splunk Inc. > > Still grepping through log files to find problems? Stop. > > Now Search log events and configuration files using AJAX and a > > browser. > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > _______________________________________________ > > Hypercontent-users mailing list > > Hyp...@li... > > https://lists.sourceforge.net/lists/listinfo/hypercontent-users > > > > ********************************************************************** > ******************* > To view the terms under which this email is distributed, please go > to http://www.hull.ac.uk/legal/email_disclaimer.html > ********************************************************************** > ******************* |