W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2006

[Bug 3946] Typing of processing-instructions

From: <bugzilla@wiggum.w3.org>
Date: Thu, 02 Nov 2006 18:17:04 +0000
To: public-qt-comments@w3.org
Message-Id: <E1Gfh7g-0003BW-Rp@wiggum.w3.org>


           Summary: Typing of processing-instructions
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Formal Semantics
        AssignedTo: simeon@us.ibm.com
        ReportedBy: nick@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

We are looking at ForExprType060 and ForExprType061 in XQTS which are

for $test as processing-instruction("filesystem") in
return $test


for $test as processing-instruction("unknown") in
return $test

one if which is meant to throw a type exception, the other not, as all
processing instructions nodes are <?filesystem?>. But I don't believe the
formal semantics describe this behaviour.

The normalization rules in 3.5.4 state

[processing-instruction(StringLiteral)]sequencetype == processing-instruction?

Static typing in 4.8.2:

statEnv |-  Expr1 : Type1
Type0 = [ SequenceType ]sequencetype
statEnv  |-  prime(Type1) <: Type0
statEnv |-  VarName1 of var expands to Variable1
statEnv + varType(Variable1 => Type0)  |-  Expr2 : Type2
statEnv |-  for $VarName1 as SequenceType in Expr1 return Expr2 : Type2 

passes for the above expressions as the types are Type0 and prime(Type1) are
both processing-instruction

For dynamic evaluation 8.3.1 Matches states

statEnv |-  processing-instruction NCName { String } matches


statEnv |-  Value matches (Type | empty)
statEnv |-  Value matches Type?

as I believe according to the formal semantics all processing instructions
match processing-instruction("anything").
Received on Thursday, 2 November 2006 18:17:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:16 UTC