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

Re: Need Help: Creating XML Tag with ":"


creating a tag
On Tue, Oct 29, 2002 at 12:08:35PM +0530, Satish Lohar wrote:
> I am new in XML. I have created one XML file which contains some tags.
> xml tag is <enabled:int>1</enabled:int> and it is created against HTML tag  <input type=checkbox name="enabled:int" value="1" CHECKED>.
> But ":" is special character. So XML Parser fails here. Can anyone let me know what should I do so that it will work.

If your definition of 'working' is that your element names can contain
colons, I'm afraid there is nothing you can do. Your options are:

  1) Go ahead and use your markup with colons, but don't call it XML, 
     and don't expect XML parsers to be able to process it (I guess
     you'll have to write your own parser); or

  2) Use a different separator instead of a colon. Hyphens or periods
     would work.

Personally, I would go with (2). Even if you absolutely must use colons
in the HTML, you'd just have to modify your transformation code to
translate hyphens to colons. That should be trivial to do in Perl, and
shouldn't degrade performance much.

-- 
Matt Gushee                 When a nation follows the Way,
Englewood, Colorado, USA    Horses bear manure through
mgushee@h...           its fields;
http://www.havenrock.com/   When a nation ignores the Way,
                            Horses bear soldiers through
                                its streets.
                                
                            --Lao Tzu (Peter Merel, trans.)

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.