Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Syntax for PI "target" is supposed to permit colons?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Leif Stainsby" <lstainsby AT galdosinc.com>
  • To: "XOM API for Processing XML with Java" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Syntax for PI "target" is supposed to permit colons?
  • Date: Mon, 3 May 2010 17:04:49 -0700


Found the missing piece: In "Namespaces in XML 1.0 (Third Edition)",
section 7, "Conformance of Documents":
http://www.w3.org/TR/REC-xml-names/#Conformance

it indicates that PI targets must conform to the NCName production (when
namespaces are enabled) in order for the containing document to conform
to the Namespace spec.

Salut,

...Leif

-------------------------------------------------
When will the madness end....



> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> Leif Stainsby
> Sent: Monday, May 03, 2010 4:10 PM
> To: xom-interest AT lists.ibiblio.org
> Subject: [XOM-interest] Syntax for PI "target" is supposed to
> permit colons?
>
> Hi,
>
> We wanted to qualify our application specific PI "targets"
> with an XML-ish prefix like so:
> <?app:some-pi pi-data?>
> where "app" is a prefix which is consistently used to refer
> to our application. But it seems that some tools/libraries do
> not like this.
> We initally encountered the problem on JDOM 1.0 (fed by
> Xerces 2.9.0) and further investigation indicated what
> appears to be an inconsistency between the XML 1.0 spec and
> some commonly used XML tools, such as XOM.
>
> It seems that a PI "target" is explicitly allowed to contain
> a colon (":").
>
> XML 1.0 (Fifth edition), see the NameStartChar production:
> http://www.w3.org/TR/REC-xml/#NT-NameStartChar
>
> and has since the beginning, XML 1.0 (First edition), see the NT-Name
> production:
> http://www.w3.org/TR/1998/REC-xml-19980210#NT-Name
>
> Yet XOM restricts a PI "target" to the NCName production,
> thus expressly excluding our friend the colon (":"). See the
> XOM JavaDoc for
> ProcessingInstructions:
>
> http://www.xom.nu/apidocs/nu/xom/ProcessingInstruction.html#Pr
> ocessingIn
> struction%28java.lang.String,%20java.lang.String%29
>
> <quote>
> IllegalTargetException - if the target is not a
> non-colonized name or is the string "xml" in any case </quote>
>
> Has anyone else noticed this? Is this a known issue that
> everyone simply ignores?
>
> Regards,
>
> ...Leif
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>




Archive powered by MHonArc 2.6.24.

Top of Page