Subject: Re: [xsl] Implementing Conditional Text From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 13 Jun 2012 16:37:19 -0400 |
Thanks for all the responses. We're taking the advice and implementing this using a span like element for inline text situations and condition attributes on div like elements where we will permit conditional content. We're going to keep processing-instructions for setting the conditions since our users want to be able to define and switch conditions on and off at any point in a document.
We are not allowing the conditional text to break existing element boundaries or to be nested within other conditions so the following example should represent what we're trying to do:
<topic>
<p>Mary had a little <?condStart normal:true?>lamb<?condStop normal:true?><?condStart special:true?>pony<?condStop special:true?>...</p>
<topic> <p>Mary had a little <span><?cond normal:true?>lamb</span> <span><?cond special:true?>pony</span>...</p>
-- Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012 Contact us for world-wide XML consulting and instructor-led training Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Implementing Conditional , Craig Sampson | Thread | [xsl] How to make this XSLT works f, Jo Na |
Re: [xsl] Implementing Conditional , Craig Sampson | Date | [xsl] preceding-sibling:: oddity, Jeff Hooker |
Month |