xsl-list
[Top] [All Lists]

[xsl] Using PIs to set attributes

2006-06-07 23:33:12
I've got some XML that looks like this:
 
<p>Programmatic access to objects is determined by the objects
that are 
  <ul><?Fm Condstart API_Only?>
    <li>defined in your enterprise WSDL file</li>
    <li><?Fm Condend API_Only?><?Fm Condstart OT_Only?>
          available in the EntityNames[] array in the Session3 object
          <?Fm Condend OT_Only?></li>
    <li>in your organization configuration</li>
    <li>valid with your security access  ....
 
The processing instructions are designed to indicate conditional text
(if API is the target, include the content between the <?Fm Condstart
API_Only?> and  <?Fm Condend API_Only?>).
 
I'd like to process this XML and be able to replace it with something
like this:
 
<p>Programmatic access to objects is determined by the objects
that are 
  <ul>
    <li platform="api">defined in your enterprise WSDL file</li>
    <li><ph platform="ot">available in the EntityNames[] array
           in the Session3 object</ph></li>
    <li>in your organization configuration</li>
    <li>valid with your security access  ....
 
I'm really not sure how to do this.  These PIs are ill-behaved, crossing
element boundaries, can be nested, and can cross each other's boundaries
as well.  In other words, you could also see this:
 
<p>Programmatic access to objects is determined by the objects
that are 
  <ul><?Fm Condstart API_Only?>
    <li>defined in your enterprise WSDL file</li>
    <li><?Fm Condstart OT_Only?><?Fm Condend API_Only?>
          available in the EntityNames[] array in the Session3 object
          <?Fm Condend OT_Only?></li>
    <li>in your organization configuration</li>
    <li>valid with your security access  ....
 
Notice how OT_Only starts before API_Only ends?  I'm stumped, so any
advice would be greatly appreciated.
 
      Steve


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>