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

Correcting unbound namespace prefixes

Subject: Correcting unbound namespace prefixes
From: Tony Nassar <tnassar@xxxxxxxxxxxx>
Date: Mon, 2 Aug 2010 09:08:43 -0700
 Correcting unbound namespace prefixes
I'm not sure this is the correct place to post. This may be a question about
JAXP, or simply about good standard operating procedure for bad input data.

I've got some XML that I know is invalid, but I'm not in a position to get the
customer to fix it. Here's what it looks like:

   <text>Four score and twenty years ago..,</text>
   <pp:metadata publication-date="2010-07-31T12:30:00Z" />

You get the idea (I hope): clearly someone began with XML in the "" namespace,
extracted metadata in a post-processing step, and inserted the corresponding
markup without adding the necessary namespace declarations or mapping "pp" to
one. I don't know of a way to fix this through the JAXP API (i.e.
interpolating the prefix mapping). Or am I better off just preprocessing this
XML via Perl or Python before it's ever parsed?

Tony Nassar Ph.D.
Palantir Technologies | Forward Deployed Engineer

Current Thread


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.
First Name
Last Name
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.