Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Valid PI tag names

Reply
Thread Tools

Valid PI tag names

 
 
Spacen Jasset
Guest
Posts: n/a
 
      01-20-2005
I am thinking of using XML PI tags to convey some preprocessing
instructions to a pre-processor before passing the xml to an xmlparser
in an external library.

Something likethis

<?pi?>

I've read the xml specification and it seems to allow colons in the PI
name like namespaces, thus:

<?pi:test?>

However, internet exporer complains the document isn't valid. So
presumably it's not and there is some footnote to this affect somewhere?
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      01-20-2005


Spacen Jasset wrote:


> I've read the xml specification and it seems to allow colons in the PI
> name like namespaces, thus:
>
> <?pi:test?>
>
> However, internet exporer complains the document isn't valid. So
> presumably it's not and there is some footnote to this affect somewhere?


Yes, XML 1.0 doesn't know about namespaces, a second recommendation
covers that and it says in here
<http://www.w3.org/TR/REC-xml-names/#Conformance>

"No entity names, PI targets, or notation names contain any colons."

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
Richard Tobin
Guest
Posts: n/a
 
      01-20-2005
In article <(E-Mail Removed)>,
Spacen Jasset <(E-Mail Removed)> wrote:

>I've read the xml specification and it seems to allow colons in the PI
>name like namespaces, thus:
>
><?pi:test?>
>
>However, internet exporer complains the document isn't valid. So
>presumably it's not and there is some footnote to this affect somewhere?


It's legal XML, but most tools expect conformance to other standards
too, in particular the XML Namespaces specification. This uses colons
for its own purposes, and does not allow them in PI names, so it would
be very unwise to use them. You can still use hyphens and underscores.

-- Richard
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Re: Valid form element names? How to use ID instead of name? Processing form data Michael Winter HTML 4 03-06-2004 10:21 PM
Re: Valid form element names? How to use ID instead of name? Processing form data Jukka K. Korpela HTML 3 03-06-2004 04:30 PM
Re: Valid form element names? How to use ID instead of name? Processingform data DU HTML 0 03-06-2004 02:44 PM
valid URL's - file names ? Bob HTML 13 12-26-2003 10:46 AM



Advertisments