query regarding xs:key & key ref

Discussion in 'XML' started by shyam, Jun 16, 2006.

  1. shyam

    shyam Guest

    Hi All

    As per my understanding we use xs:key when we want to have a unique
    value for a element or attribute and keyref to refer to one of the
    unique values of that element or attribute.

    However I am not sure if this uniqueness is checked when we validate a
    document using XMLSpy

    Here is the protion of myschema

    ==================================================================
    <xs:element name="PROTOHEADERENTRY">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFGRAMMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFRULESET">
    <xs:simpleType>
    <xs:list>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:pattern value="\p{IsBasicLatin}*"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:list>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="NAME" type="xs:token"/>
    <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    </xs:complexType>
    </xs:element>
    =================================================================

    now at the root element , which is above PROTOHEADERENTRY, i do this
    ================================================================
    <xs:key name="KEYHEADERNUM">
    <xs:selector xpath="./PROTOHEADERENTRY"/>
    <xs:field xpath="HEADERSEQNUM"/>
    </xs:key>

    Now when I write a xml file and validate against this schema it gets
    validated even if I use same HEADERSEQNUM value for multiple
    PROTOHEADERENTRY elements

    I am using XMLSpy

    I think I am missing some trick here

    PLease Help

    Regards
    Shyam
     
    shyam, Jun 16, 2006
    #1
    1. Advertising

  2. shyam wrote:


    > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>



    > <xs:selector xpath="./PROTOHEADERENTRY"/>
    > <xs:field xpath="HEADERSEQNUM"/>


    XPath to select an attribute is @attributeName so you probably want
    <xs:field xpath="@HEADERSEQNUM"/>

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jun 16, 2006
    #2
    1. Advertising

  3. shyam

    shyam Guest

    Martin Honnen wrote:
    > shyam wrote:
    >
    >
    > > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>

    >
    >
    > > <xs:selector xpath="./PROTOHEADERENTRY"/>
    > > <xs:field xpath="HEADERSEQNUM"/>

    >
    > XPath to select an attribute is @attributeName so you probably want
    > <xs:field xpath="@HEADERSEQNUM"/>


    Even with this its dosent work

    >
    > --
    >
    > Martin Honnen
    > http://JavaScript.FAQTs.com/
     
    shyam, Jun 16, 2006
    #3
  4. You need to declare a target namespace in your schema and use it in the
    xpath. In the example below I used myTNS as the prefix for your target
    namespace.

    <xs:schema ... targetNamespace="myTargetNamespace"
    xmlns:myTNS="myTargetNamespace" xmlns="myTargetNamespace"...>

    .....

    <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    <xs:field xpath="@HEADERSEQNUM"/>

    ....

    --
    Stan Kitsis
    Program Manager, XML Technologies
    Microsoft Corporation

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm


    "shyam" <> wrote in message
    news:...
    >
    > Martin Honnen wrote:
    >> shyam wrote:
    >>
    >>
    >> > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>

    >>
    >>
    >> > <xs:selector xpath="./PROTOHEADERENTRY"/>
    >> > <xs:field xpath="HEADERSEQNUM"/>

    >>
    >> XPath to select an attribute is @attributeName so you probably want
    >> <xs:field xpath="@HEADERSEQNUM"/>

    >
    > Even with this its dosent work
    >
    >>
    >> --
    >>
    >> Martin Honnen
    >> http://JavaScript.FAQTs.com/

    >
     
    Stan Kitsis [MSFT], Jun 16, 2006
    #4
  5. shyam

    shyam Guest

    Stan Kitsis [MSFT] wrote:
    > You need to declare a target namespace in your schema and use it in the
    > xpath. In the example below I used myTNS as the prefix for your target
    > namespace.
    >
    > <xs:schema ... targetNamespace="myTargetNamespace"
    > xmlns:myTNS="myTargetNamespace" xmlns="myTargetNamespace"...>
    >
    > ....
    >
    > <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    > <xs:field xpath="@HEADERSEQNUM"/>
    >


    Thanks Stan This has worked ,
    however the keyref thing is still not working
    I have defined a keyref
    <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    <xs:selector xpath="./myTNS:pROTOHEADER"/>
    <xs:field xpath="@ENTRYSEQNUM"/>
    </xs:keyref>

    which refers to the earlier xs:key

    So i want is that the ENTRYSEQNUM attribute of PROTOHEADER element
    should refer to a unique and existing HEADERSEQNUM attribute of
    myTNS:pROTOHEADERENTRY element

    I guess I am again missing some minor trick and would graetly
    appretiate if you could help out

    Thanks
    Shyam

    > ...
    >
    > --
    > Stan Kitsis
    > Program Manager, XML Technologies
    > Microsoft Corporation
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > Use of included script samples are subject to the terms specified at
    > http://www.microsoft.com/info/cpyright.htm
    >
    >
    > "shyam" <> wrote in message
    > news:...
    > >
    > > Martin Honnen wrote:
    > >> shyam wrote:
    > >>
    > >>
    > >> > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    > >>
    > >>
    > >> > <xs:selector xpath="./PROTOHEADERENTRY"/>
    > >> > <xs:field xpath="HEADERSEQNUM"/>
    > >>
    > >> XPath to select an attribute is @attributeName so you probably want
    > >> <xs:field xpath="@HEADERSEQNUM"/>

    > >
    > > Even with this its dosent work
    > >
    > >>
    > >> --
    > >>
    > >> Martin Honnen
    > >> http://JavaScript.FAQTs.com/

    > >
     
    shyam, Jun 17, 2006
    #5
  6. Shyam,

    Can you post your schema?

    --
    Stan Kitsis
    Program Manager, XML Technologies
    Microsoft Corporation

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Use of included script samples are subject to the terms specified at
    http://www.microsoft.com/info/cpyright.htm


    "shyam" <> wrote in message
    news:...
    >
    > Stan Kitsis [MSFT] wrote:
    >> You need to declare a target namespace in your schema and use it in the
    >> xpath. In the example below I used myTNS as the prefix for your target
    >> namespace.
    >>
    >> <xs:schema ... targetNamespace="myTargetNamespace"
    >> xmlns:myTNS="myTargetNamespace" xmlns="myTargetNamespace"...>
    >>
    >> ....
    >>
    >> <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    >> <xs:field xpath="@HEADERSEQNUM"/>
    >>

    >
    > Thanks Stan This has worked ,
    > however the keyref thing is still not working
    > I have defined a keyref
    > <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    > <xs:selector xpath="./myTNS:pROTOHEADER"/>
    > <xs:field xpath="@ENTRYSEQNUM"/>
    > </xs:keyref>
    >
    > which refers to the earlier xs:key
    >
    > So i want is that the ENTRYSEQNUM attribute of PROTOHEADER element
    > should refer to a unique and existing HEADERSEQNUM attribute of
    > myTNS:pROTOHEADERENTRY element
    >
    > I guess I am again missing some minor trick and would graetly
    > appretiate if you could help out
    >
    > Thanks
    > Shyam
    >
    >> ...
    >>
    >> --
    >> Stan Kitsis
    >> Program Manager, XML Technologies
    >> Microsoft Corporation
    >>
    >> This posting is provided "AS IS" with no warranties, and confers no
    >> rights.
    >> Use of included script samples are subject to the terms specified at
    >> http://www.microsoft.com/info/cpyright.htm
    >>
    >>
    >> "shyam" <> wrote in message
    >> news:...
    >> >
    >> > Martin Honnen wrote:
    >> >> shyam wrote:
    >> >>
    >> >>
    >> >> > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    >> >>
    >> >>
    >> >> > <xs:selector xpath="./PROTOHEADERENTRY"/>
    >> >> > <xs:field xpath="HEADERSEQNUM"/>
    >> >>
    >> >> XPath to select an attribute is @attributeName so you probably want
    >> >> <xs:field xpath="@HEADERSEQNUM"/>
    >> >
    >> > Even with this its dosent work
    >> >
    >> >>
    >> >> --
    >> >>
    >> >> Martin Honnen
    >> >> http://JavaScript.FAQTs.com/
    >> >

    >
     
    Stan Kitsis [MSFT], Jun 19, 2006
    #6
  7. shyam

    shyam Guest

    Stan Kitsis [MSFT] wrote:
    > Shyam,
    >
    > Can you post your schema?


    ==============================================================
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.w3schools.com" xmlns:myTNS="MYTARGET"
    targetNamespace="MYTARGET" elementFormDefault="qualified">
    <xs:element name="PROTOHEADERENTRY">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFGRAMMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFRULESET">
    <xs:simpleType>
    <xs:list>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:pattern value="\p{IsBasicLatin}*"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:list>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ABNFEXCEPTION" maxOccurs="unbounded">
    <xs:complexType>
    <xs:attribute name="RULENAME" type="xs:token"/>
    <xs:attribute name="EXCEPTION">
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:enumeration value="MANDATORY"/>
    <xs:enumeration value="IGNORESEQ"/>
    <xs:enumeration value="IGNORECASE"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="NAME" type="xs:token"/>
    <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="ABNFBASIC">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RULESTRING" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="ABNFBASICNAME" type="xs:NMTOKEN"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="ABNFRULE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RULESTRING">
    <xs:simpleType>
    <xs:list>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:pattern value="\p{IsBasicLatin}*"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:list>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="RULENAME" type="xs:NMTOKEN"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="PROTOHEADER">
    <xs:complexType>
    <xs:attribute name="PROTOHEADERNAME" type="xs:token"/>
    <xs:attribute name="ENTRYSEQNUM" type="xs:positiveInteger"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="PROTODEF">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="PROTOTABLE">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="myTNS:pROTOHEADER" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element ref="myTNS:pROTOHEADERENTRY" maxOccurs="unbounded"/>
    <xs:element ref="myTNS:ABNFRULE" maxOccurs="unbounded"/>
    <xs:element ref="myTNS:ABNFBASIC" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="PROTOCOLNAME" type="xs:token"/>
    <xs:attribute name="PROJECTNAME" type="xs:string"/>
    </xs:complexType>
    <xs:key name="KEYHEADERNUM">
    <xs:selector xpath="myTNS:pROTOHEADERENTRY"/>
    <xs:field xpath="@HEADERSEQNUM"/>
    </xs:key>
    <xs:key name="KEYHEADERNAME">
    <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    <xs:field xpath="@NAME"/>
    </xs:key>
    <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    <xs:selector xpath="./myTNS:pROTOHEADER"/>
    <xs:field xpath="@ENTRYSEQNUM"/>
    </xs:keyref>
    </xs:element>
    </xs:schema>

    ===============================================================

    >
    > --
    > Stan Kitsis
    > Program Manager, XML Technologies
    > Microsoft Corporation
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > Use of included script samples are subject to the terms specified at
    > http://www.microsoft.com/info/cpyright.htm
    >
    >
    > "shyam" <> wrote in message
    > news:...
    > >
    > > Stan Kitsis [MSFT] wrote:
    > >> You need to declare a target namespace in your schema and use it in the
    > >> xpath. In the example below I used myTNS as the prefix for your target
    > >> namespace.
    > >>
    > >> <xs:schema ... targetNamespace="myTargetNamespace"
    > >> xmlns:myTNS="myTargetNamespace" xmlns="myTargetNamespace"...>
    > >>
    > >> ....
    > >>
    > >> <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    > >> <xs:field xpath="@HEADERSEQNUM"/>
    > >>

    > >
    > > Thanks Stan This has worked ,
    > > however the keyref thing is still not working
    > > I have defined a keyref
    > > <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    > > <xs:selector xpath="./myTNS:pROTOHEADER"/>
    > > <xs:field xpath="@ENTRYSEQNUM"/>
    > > </xs:keyref>
    > >
    > > which refers to the earlier xs:key
    > >
    > > So i want is that the ENTRYSEQNUM attribute of PROTOHEADER element
    > > should refer to a unique and existing HEADERSEQNUM attribute of
    > > myTNS:pROTOHEADERENTRY element
    > >
    > > I guess I am again missing some minor trick and would graetly
    > > appretiate if you could help out
    > >
    > > Thanks
    > > Shyam
    > >
    > >> ...
    > >>
    > >> --
    > >> Stan Kitsis
    > >> Program Manager, XML Technologies
    > >> Microsoft Corporation
    > >>
    > >> This posting is provided "AS IS" with no warranties, and confers no
    > >> rights.
    > >> Use of included script samples are subject to the terms specified at
    > >> http://www.microsoft.com/info/cpyright.htm
    > >>
    > >>
    > >> "shyam" <> wrote in message
    > >> news:...
    > >> >
    > >> > Martin Honnen wrote:
    > >> >> shyam wrote:
    > >> >>
    > >> >>
    > >> >> > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    > >> >>
    > >> >>
    > >> >> > <xs:selector xpath="./PROTOHEADERENTRY"/>
    > >> >> > <xs:field xpath="HEADERSEQNUM"/>
    > >> >>
    > >> >> XPath to select an attribute is @attributeName so you probably want
    > >> >> <xs:field xpath="@HEADERSEQNUM"/>
    > >> >
    > >> > Even with this its dosent work
    > >> >
    > >> >>
    > >> >> --
    > >> >>
    > >> >> Martin Honnen
    > >> >> http://JavaScript.FAQTs.com/
    > >> >

    > >
     
    shyam, Jun 20, 2006
    #7
  8. shyam

    shyam Guest

    Stan Kitsis [MSFT] wrote:
    > Shyam,
    >
    > Can you post your schema?


    ==============================================================
    <?xml version="1.0"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.w3schools.com" xmlns:myTNS="MYTARGET"
    targetNamespace="MYTARGET" elementFormDefault="qualified">
    <xs:element name="PROTOHEADERENTRY">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFGRAMMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ABNFRULESET">
    <xs:simpleType>
    <xs:list>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:pattern value="\p{IsBasicLatin}*"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:list>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ABNFEXCEPTION" maxOccurs="unbounded">
    <xs:complexType>
    <xs:attribute name="RULENAME" type="xs:token"/>
    <xs:attribute name="EXCEPTION">
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:enumeration value="MANDATORY"/>
    <xs:enumeration value="IGNORESEQ"/>
    <xs:enumeration value="IGNORECASE"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="NAME" type="xs:token"/>
    <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="ABNFBASIC">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RULESTRING" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="ABNFBASICNAME" type="xs:NMTOKEN"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="ABNFRULE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="RULESTRING">
    <xs:simpleType>
    <xs:list>
    <xs:simpleType>
    <xs:restriction base="xs:token">
    <xs:pattern value="\p{IsBasicLatin}*"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:list>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="RULENAME" type="xs:NMTOKEN"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="PROTOHEADER">
    <xs:complexType>
    <xs:attribute name="PROTOHEADERNAME" type="xs:token"/>
    <xs:attribute name="ENTRYSEQNUM" type="xs:positiveInteger"/>
    </xs:complexType>
    </xs:element>
    <xs:element name="PROTODEF">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="PROTOTABLE">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="myTNS:pROTOHEADER" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element ref="myTNS:pROTOHEADERENTRY" maxOccurs="unbounded"/>
    <xs:element ref="myTNS:ABNFRULE" maxOccurs="unbounded"/>
    <xs:element ref="myTNS:ABNFBASIC" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="PROTOCOLNAME" type="xs:token"/>
    <xs:attribute name="PROJECTNAME" type="xs:string"/>
    </xs:complexType>
    <xs:key name="KEYHEADERNUM">
    <xs:selector xpath="myTNS:pROTOHEADERENTRY"/>
    <xs:field xpath="@HEADERSEQNUM"/>
    </xs:key>
    <xs:key name="KEYHEADERNAME">
    <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    <xs:field xpath="@NAME"/>
    </xs:key>
    <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    <xs:selector xpath="./myTNS:pROTOHEADER"/>
    <xs:field xpath="@ENTRYSEQNUM"/>
    </xs:keyref>
    </xs:element>
    </xs:schema>

    ===============================================================

    >
    > --
    > Stan Kitsis
    > Program Manager, XML Technologies
    > Microsoft Corporation
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    > Use of included script samples are subject to the terms specified at
    > http://www.microsoft.com/info/cpyright.htm
    >
    >
    > "shyam" <> wrote in message
    > news:...
    > >
    > > Stan Kitsis [MSFT] wrote:
    > >> You need to declare a target namespace in your schema and use it in the
    > >> xpath. In the example below I used myTNS as the prefix for your target
    > >> namespace.
    > >>
    > >> <xs:schema ... targetNamespace="myTargetNamespace"
    > >> xmlns:myTNS="myTargetNamespace" xmlns="myTargetNamespace"...>
    > >>
    > >> ....
    > >>
    > >> <xs:selector xpath="./myTNS:pROTOHEADERENTRY"/>
    > >> <xs:field xpath="@HEADERSEQNUM"/>
    > >>

    > >
    > > Thanks Stan This has worked ,
    > > however the keyref thing is still not working
    > > I have defined a keyref
    > > <xs:keyref name="KEYENTRYNUM" refer="myTNS:KEYHEADERNUM">
    > > <xs:selector xpath="./myTNS:pROTOHEADER"/>
    > > <xs:field xpath="@ENTRYSEQNUM"/>
    > > </xs:keyref>
    > >
    > > which refers to the earlier xs:key
    > >
    > > So i want is that the ENTRYSEQNUM attribute of PROTOHEADER element
    > > should refer to a unique and existing HEADERSEQNUM attribute of
    > > myTNS:pROTOHEADERENTRY element
    > >
    > > I guess I am again missing some minor trick and would graetly
    > > appretiate if you could help out
    > >
    > > Thanks
    > > Shyam
    > >
    > >> ...
    > >>
    > >> --
    > >> Stan Kitsis
    > >> Program Manager, XML Technologies
    > >> Microsoft Corporation
    > >>
    > >> This posting is provided "AS IS" with no warranties, and confers no
    > >> rights.
    > >> Use of included script samples are subject to the terms specified at
    > >> http://www.microsoft.com/info/cpyright.htm
    > >>
    > >>
    > >> "shyam" <> wrote in message
    > >> news:...
    > >> >
    > >> > Martin Honnen wrote:
    > >> >> shyam wrote:
    > >> >>
    > >> >>
    > >> >> > <xs:attribute name="HEADERSEQNUM" type="xs:positiveInteger"/>
    > >> >>
    > >> >>
    > >> >> > <xs:selector xpath="./PROTOHEADERENTRY"/>
    > >> >> > <xs:field xpath="HEADERSEQNUM"/>
    > >> >>
    > >> >> XPath to select an attribute is @attributeName so you probably want
    > >> >> <xs:field xpath="@HEADERSEQNUM"/>
    > >> >
    > >> > Even with this its dosent work
    > >> >
    > >> >>
    > >> >> --
    > >> >>
    > >> >> Martin Honnen
    > >> >> http://JavaScript.FAQTs.com/
    > >> >

    > >
     
    shyam, Jun 20, 2006
    #8
  9. Hi,

    From your schema, it looks like PROTOHEADER is a grandchild of PROTODEF,
    so you should use TWO slashes in your keyref selector, as in:

    .//myTNS:pROTOHEADER

    or you could use a more precise path:

    myTNS:pROTOTABLE/myTNS:pROTOHEADER

    Hope that helps,
    Priscilla
    ----------------------------------
    Priscilla Walmsley
    Author, Definitive XML Schema
    XQuery
    http://www.datypic.com
    ----------------------------------

    *** Sent via Developersdex http://www.developersdex.com ***
     
    Priscilla Walmsley, Jun 21, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    363
  2. Replies:
    22
    Views:
    794
    peter koch
    Apr 30, 2008
  3. Replies:
    6
    Views:
    378
    James Kanze
    Apr 29, 2008
  4. Navindra Umanee

    strong ref from weak ref?

    Navindra Umanee, Feb 12, 2005, in forum: Ruby
    Replies:
    2
    Views:
    157
    Navindra Umanee
    Feb 12, 2005
  5. Juha Nieminen
    Replies:
    13
    Views:
    651
    Edek Pienkowski
    Aug 29, 2012
Loading...

Share This Page