[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Using PIs to set attributes

Subject: Using PIs to set attributes
From: "Steven Anderson" <sanderson@xxxxxxxxxxxxxx>
Date: Wed, 7 Jun 2006 23:31:17 -0700
steven anderson
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.