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

Re: HTML and XML data parsing

  • To: "Falls, Travis D (CASD, IT)" <Travis.Falls@t...>
  • Subject: Re: HTML and XML data parsing
  • From: Uche Ogbuji <uche.ogbuji@f...>
  • Date: Thu, 01 Aug 2002 09:26:55 -0600
  • Cc: "'xml-dev@l...'" <xml-dev@l...>
  • In-reply-to: Message from "Falls, Travis D (CASD, IT)" <Travis.Falls@t...> of "Tue, 30 Jul 2002 16:14:14 EDT." <951967FCF5C4D211B0610008C75D2AA11224A579@c...>
  • Sender: uche.ogbuji@f...

data parsing
> Hello all,
> I am new to the list, and fairly new to XML.  I am implementing an I-Planet
> portal using RDF files.  I parse the files and render each channel with a
> specific xsl file.  I have a need to put a large html block in between xml
> tags, but when I parse the xml the "<" and ">" tags get changed to the
> escaped version.  How do I make this area not do this? 

This si not a direct response to your question, but I wanted to point out a 
variant approach I use.  I use Wiki text within RDF tags that contain markup, 
not HTML.  Therefor, instead of

<rdf:Description>
  <x:body rdf:parseType="Literal">
<div>
  <h1>Nde ewo</h1>
  <p><a href="http://4Suite.org">Ihe a</a> di iche</p>
  <pre></code>
spam = eggs - 1
  </code></pre>
</div>
  </x:body>
</rdf:Description>

I use

<rdf:Description>
  <x:body>
=Nde ewo=
[Ihe a|http://4Suite.org] di iche
  spam = eggs - 1
</rdf:Description>

Much less error-prone, much easier to edit and much more amenable to 
diff-based version control.  It also helps that it avoids the poorly-specified 
parseType=Literal.

I wrote a small extension element for 4XSLT for rendering this to HTML during 
transforms.

I use this technique very successfully to maintain my "Akara" documentation 
collation projects for Python/XML programming:

http://uche.ogbuji.net/tech/akara/pyxml/
http://uche.ogbuji.net/tech/akara/4suite/

Each one is completely specified as a big RDF file, and is rendered 
dynamically at request time.  Takes very little XSLT and very little Python.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One Boston: http://www.xmlconference.com/
Basic XML and RDF techniques for knowledge management, Part 7 - 
http://www-106.ibm.com/developerworks/xml/library/x-think12.html
Keeping pace with James Clark - http://www-106.ibm.com/developerworks/xml/libra
ry/x-jclark.html
Python and XML development using 4Suite, Part 3: 4RDF - 
http://www-105.ibm.com/developerworks/education.nsf/xml-onlinecourse-bytitle/8A
1EA5A2CF4621C386256BBB006F4CEC



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.