You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Peter A. Volchek" <Pe...@ti.com.od.ua> on 2002/06/25 16:03:07 UTC

FullName

To: Xerces team

Guys, can you provide me with the quick help, what is a FullName format of a QName?
The different comments in your code say different things.
For example:

File: SchemaElementDecl.hpp

    //  fSubstitutionGroupName
    //      The substitution group full name ("uristring','local")

File: XMLElementDecl.hpp

    /** Get the full name of this element type.
      *
      * Return the full name of the element. If namespaces
      * are not enabled, then this is the qName. Else it is the {uri}baseName
      * form. For those validators that always require namespace processing, it
      * will always be in the latter form because namespace processing will always
      * be on.
      */
    const XMLCh* getFullName() const;


The task I need is to find the SchemaElementDecl coresponding to the SubstitutionGroupName returning value
XMLCh* getSubstitutionGroupName() const;

I need to extract the uri from the returning value to be able to find the required element.
But I need to know the exact format of this value 1 or 2. 
1. ("uristring','local")
2. {uri}baseName   - ( is uri represent the identifier (uriId) or string )

Thanks,
Peter










Re: FullName

Posted by "Peter A. Volchek" <Pe...@ti.com.od.ua>.
>Any thougths on the last issue? 

No, looks good.
Peter
  ----- Original Message ----- 
  From: Khaled Noaman 
  To: xerces-c-dev@xml.apache.org 
  Sent: Wednesday, June 26, 2002 5:58 PM
  Subject: Re: FullName


  Good suggestion. I agree with you that storing the substitution info as a SchemaElementDecl is more practical, and makes sense. We'll look into it. The assumption will be that if  a substitution element does not exist, a stub SchemaElementDecl will be created in the corresponding grammar (based on NS). If a grammar with that NS does not exist, we will create that stub in the current grammar. Any thougths on the last issue? 
  Khaled 

  "Peter A. Volchek" wrote: 

     Just create a stub SchemaElementDecl in the element's pool with the content model = Any and createReason=Declared or NoReason. Later, if element appears in the schema, just fill it properly. If no, leave it with these stub settings.Thoughts ?   
      ----- Original Message -----
      From: Khaled Noaman
      To: xerces-c-dev@xml.apache.org
      Sent: Wednesday, June 26, 2002 4:45 PM
      Subject: Re: FullName
       That's a good question. There is no guarantee that the substitution group element will exist in the schema (either current namespace or imported namespace). By storing the fullName, we do not lose that information if the substitution element is missing (PSVI?). 
      Khaled 

      "Peter A. Volchek" wrote: 

         Khaled,Thanks for detailed explanation.BTW. Why not provide smth. like this ?const SchemaElementDecl* getSubstitutionGroup() const; Peter 
          ----- Original Message -----
          From:Khaled Noaman
          To: xerces-c-dev@xml.apache.org
          Sent: Tuesday, June 25, 2002 8:13 PM
          Subject: Re: FullName
           Peter, 
          The name of the subsitutionGroup elem, when you call getSubstitutionGroupName, is in the format of 'uri,localPart'. The uri is a string. The documentation for XMLElementDecl, needs to be updated. The getFullName method will actually return the QName's rawname, which is in the format 'prefix:localPart'. If the QName has no prefix, then the rawname will be the same as the QName's localPart. QName also stores the uri information but as an identifier and not a string. You need to convert the string value of the uri to an id. Currently, that information is internal to the scanner (fURIStringPool). Straighforward, isn't it :)? 

          Khaled 

          "Peter A. Volchek" wrote: 

            To: Xerces team Guys, can you provide me with the quick help, what is a FullName format of a QName?The different comments in your code say different things.For example:File: SchemaElementDecl.hpp     //  fSubstitutionGroupName 
                //      The substitution group full name ("uristring','local")File: XMLElementDecl.hpp     /** Get the full name of this element type. 
                  * 
                  * Return the full name of the element. If namespaces 
                  * are not enabled, then this is the qName. Else it is the {uri}baseName 
                  * form. For those validators that always require namespace processing, it 
                  * will always be in the latter form because namespace processing will always 
                  * be on. 
                  */ 
                const XMLCh* getFullName() const; The task I need is to find the SchemaElementDecl coresponding to the SubstitutionGroupName returning valueXMLCh* getSubstitutionGroupName() const; I need to extract the uri from the returning value to be able to find the required element.But I need to know the exact format of this value 1 or 2.1. ("uristring','local")2. {uri}baseName   - ( is uri represent the identifier (uriId) or string ) Thanks,Peter

Re: FullName

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Good suggestion. I agree with you that storing the substitution info as
a SchemaElementDecl is more practical, and makes sense. We'll look into
it. The assumption will be that if  a substitution element does not
exist, a stub SchemaElementDecl will be created in the corresponding
grammar (based on NS). If a grammar with that NS does not exist, we will
create that stub in the current grammar. Any thougths on the last issue?

Khaled

"Peter A. Volchek" wrote:

>  Just create a stub SchemaElementDecl in the element's pool with the
> content model = Any and createReason=Declared or NoReason. Later, if
> element appears in the schema, just fill it properly. If no, leave it
> with these stub settings.Thoughts ?
>
>      ----- Original Message -----
>      From: Khaled Noaman
>      To: xerces-c-dev@xml.apache.org
>      Sent: Wednesday, June 26, 2002 4:45 PM
>      Subject: Re: FullName
>       That's a good question. There is no guarantee that the
>      substitution group element will exist in the schema (either
>      current namespace or imported namespace). By storing the
>      fullName, we do not lose that information if the
>      substitution element is missing (PSVI?).
>
>      Khaled
>
>      "Peter A. Volchek" wrote:
>
>     >  Khaled,Thanks for detailed explanation.BTW. Why not
>     > provide smth. like this ?const SchemaElementDecl*
>     > getSubstitutionGroup() const; Peter
>     >
>     >      ----- Original Message -----
>     >      From:Khaled Noaman
>     >      To: xerces-c-dev@xml.apache.org
>     >      Sent: Tuesday, June 25, 2002 8:13 PM
>     >      Subject: Re: FullName
>     >       Peter,
>     >
>     >      The name of the subsitutionGroup elem, when you
>     >      call getSubstitutionGroupName, is in the format
>     >      of 'uri,localPart'. The uri is a string. The
>     >      documentation for XMLElementDecl, needs to be
>     >      updated. The getFullName method will actually
>     >      return the QName's rawname, which is in the
>     >      format 'prefix:localPart'. If the QName has no
>     >      prefix, then the rawname will be the same as the
>     >      QName's localPart. QName also stores the uri
>     >      information but as an identifier and not a
>     >      string. You need to convert the string value of
>     >      the uri to an id. Currently, that information is
>     >      internal to the scanner (fURIStringPool).
>     >      Straighforward, isn't it :)?
>     >
>     >      Khaled
>     >
>     >      "Peter A. Volchek" wrote:
>     >
>     >      > To: Xerces team Guys, can you provide me with
>     >      > the quick help, what is a FullName format of a
>     >      > QName?The different comments in your code say
>     >      > different things.For example:File:
>     >      > SchemaElementDecl.hpp     //
>     >      > fSubstitutionGroupName
>     >      >     //      The substitution group full name
>     >      > ("uristring','local")File:
>     >      > XMLElementDecl.hpp     /** Get the full name of
>     >      > this element type.
>     >      >       *
>     >      >       * Return the full name of the element. If
>     >      > namespaces
>     >      >       * are not enabled, then this is the
>     >      > qName. Else it is the {uri}baseName
>     >      >       * form. For those validators that always
>     >      > require namespace processing, it
>     >      >       * will always be in the latter form
>     >      > because namespace processing will always
>     >      >       * be on.
>     >      >       */
>     >      >     const XMLCh* getFullName() const; The task
>     >      > I need is to find the SchemaElementDecl
>     >      > coresponding to the SubstitutionGroupName
>     >      > returning valueXMLCh*
>     >      > getSubstitutionGroupName() const; I need to
>     >      > extract the uri from the returning value to be
>     >      > able to find the required element.But I need to
>     >      > know the exact format of this value 1 or 2.1.
>     >      > ("uristring','local")2. {uri}baseName   - ( is
>     >      > uri represent the identifier (uriId) or string
>     >      > ) Thanks,Peter
>     >

Re: FullName

Posted by "Peter A. Volchek" <Pe...@ti.com.od.ua>.
Just create a stub SchemaElementDecl in the element's pool with the content model = Any and createReason=Declared or NoReason. Later, if element appears in the schema, just fill it properly. If no, leave it with these stub settings.
Thoughts ?


  ----- Original Message ----- 
  From: Khaled Noaman 
  To: xerces-c-dev@xml.apache.org 
  Sent: Wednesday, June 26, 2002 4:45 PM
  Subject: Re: FullName


  That's a good question. There is no guarantee that the substitution group element will exist in the schema (either current namespace or imported namespace). By storing the fullName, we do not lose that information if the substitution element is missing (PSVI?). 
  Khaled 

  "Peter A. Volchek" wrote: 

     Khaled,Thanks for detailed explanation.BTW. Why not provide smth. like this ?const SchemaElementDecl* getSubstitutionGroup() const; Peter 
      ----- Original Message -----
      From:Khaled Noaman
      To: xerces-c-dev@xml.apache.org
      Sent: Tuesday, June 25, 2002 8:13 PM
      Subject: Re: FullName
       Peter, 
      The name of the subsitutionGroup elem, when you call getSubstitutionGroupName, is in the format of 'uri,localPart'. The uri is a string. The documentation for XMLElementDecl, needs to be updated. The getFullName method will actually return the QName's rawname, which is in the format 'prefix:localPart'. If the QName has no prefix, then the rawname will be the same as the QName's localPart. QName also stores the uri information but as an identifier and not a string. You need to convert the string value of the uri to an id. Currently, that information is internal to the scanner (fURIStringPool). Straighforward, isn't it :)? 

      Khaled 

      "Peter A. Volchek" wrote: 

        To: Xerces team Guys, can you provide me with the quick help, what is a FullName format of a QName?The different comments in your code say different things.For example:File: SchemaElementDecl.hpp     //  fSubstitutionGroupName 
            //      The substitution group full name ("uristring','local")File: XMLElementDecl.hpp     /** Get the full name of this element type. 
              * 
              * Return the full name of the element. If namespaces 
              * are not enabled, then this is the qName. Else it is the {uri}baseName 
              * form. For those validators that always require namespace processing, it 
              * will always be in the latter form because namespace processing will always 
              * be on. 
              */ 
            const XMLCh* getFullName() const; The task I need is to find the SchemaElementDecl coresponding to the SubstitutionGroupName returning valueXMLCh* getSubstitutionGroupName() const; I need to extract the uri from the returning value to be able to find the required element.But I need to know the exact format of this value 1 or 2.1. ("uristring','local")2. {uri}baseName   - ( is uri represent the identifier (uriId) or string ) Thanks,Peter

Re: FullName

Posted by Khaled Noaman <kn...@ca.ibm.com>.
That's a good question. There is no guarantee that the substitution
group element will exist in the schema (either current namespace or
imported namespace). By storing the fullName, we do not lose that
information if the substitution element is missing (PSVI?).

Khaled

"Peter A. Volchek" wrote:

>  Khaled,Thanks for detailed explanation.BTW. Why not provide smth.
> like this ?const SchemaElementDecl* getSubstitutionGroup() const;
> Peter
>
>      ----- Original Message -----
>      From:Khaled Noaman
>      To: xerces-c-dev@xml.apache.org
>      Sent: Tuesday, June 25, 2002 8:13 PM
>      Subject: Re: FullName
>       Peter,
>
>      The name of the subsitutionGroup elem, when you call
>      getSubstitutionGroupName, is in the format of
>      'uri,localPart'. The uri is a string. The documentation for
>      XMLElementDecl, needs to be updated. The getFullName method
>      will actually return the QName's rawname, which is in the
>      format 'prefix:localPart'. If the QName has no prefix, then
>      the rawname will be the same as the QName's localPart. QName
>      also stores the uri information but as an identifier and not
>      a string. You need to convert the string value of the uri to
>      an id. Currently, that information is internal to the
>      scanner (fURIStringPool). Straighforward, isn't it :)?
>
>      Khaled
>
>      "Peter A. Volchek" wrote:
>
>     > To: Xerces team Guys, can you provide me with the quick
>     > help, what is a FullName format of a QName?The different
>     > comments in your code say different things.For
>     > example:File: SchemaElementDecl.hpp     //
>     > fSubstitutionGroupName
>     >     //      The substitution group full name
>     > ("uristring','local")File: XMLElementDecl.hpp     /** Get
>     > the full name of this element type.
>     >       *
>     >       * Return the full name of the element. If namespaces
>     >
>     >       * are not enabled, then this is the qName. Else it
>     > is the {uri}baseName
>     >       * form. For those validators that always require
>     > namespace processing, it
>     >       * will always be in the latter form because
>     > namespace processing will always
>     >       * be on.
>     >       */
>     >     const XMLCh* getFullName() const; The task I need is
>     > to find the SchemaElementDecl coresponding to the
>     > SubstitutionGroupName returning valueXMLCh*
>     > getSubstitutionGroupName() const; I need to extract the
>     > uri from the returning value to be able to find the
>     > required element.But I need to know the exact format of
>     > this value 1 or 2.1. ("uristring','local")2.
>     > {uri}baseName   - ( is uri represent the identifier
>     > (uriId) or string ) Thanks,Peter
>

Re: FullName

Posted by "Peter A. Volchek" <Pe...@ti.com.od.ua>.
Khaled,

Thanks for detailed explanation. 
BTW. Why not provide smth. like this ?
const SchemaElementDecl* getSubstitutionGroup() const;

Peter


  ----- Original Message ----- 
  From: Khaled Noaman 
  To: xerces-c-dev@xml.apache.org 
  Sent: Tuesday, June 25, 2002 8:13 PM
  Subject: Re: FullName


  Peter, 
  The name of the subsitutionGroup elem, when you call getSubstitutionGroupName, is in the format of 'uri,localPart'. The uri is a string. The documentation for XMLElementDecl, needs to be updated. The getFullName method will actually return the QName's rawname, which is in the format 'prefix:localPart'. If the QName has no prefix, then the rawname will be the same as the QName's localPart. QName also stores the uri information but as an identifier and not a string. You need to convert the string value of the uri to an id. Currently, that information is internal to the scanner (fURIStringPool). Straighforward, isn't it :)? 

  Khaled 

  "Peter A. Volchek" wrote: 

    To: Xerces team Guys, can you provide me with the quick help, what is a FullName format of a QName?The different comments in your code say different things.For example: File: SchemaElementDecl.hpp     //  fSubstitutionGroupName 
        //      The substitution group full name ("uristring','local")File: XMLElementDecl.hpp     /** Get the full name of this element type. 
          * 
          * Return the full name of the element. If namespaces 
          * are not enabled, then this is the qName. Else it is the {uri}baseName 
          * form. For those validators that always require namespace processing, it 
          * will always be in the latter form because namespace processing will always 
          * be on. 
          */ 
        const XMLCh* getFullName() const; The task I need is to find the SchemaElementDecl coresponding to the SubstitutionGroupName returning valueXMLCh* getSubstitutionGroupName() const; I need to extract the uri from the returning value to be able to find the required element.But I need to know the exact format of this value 1 or 2.1. ("uristring','local")2. {uri}baseName   - ( is uri represent the identifier (uriId) or string ) Thanks,Peter        

Re: FullName

Posted by Khaled Noaman <kn...@ca.ibm.com>.
Peter,

The name of the subsitutionGroup elem, when you call
getSubstitutionGroupName, is in the format of 'uri,localPart'. The uri
is a string. The documentation for XMLElementDecl, needs to be updated.
The getFullName method will actually return the QName's rawname, which
is in the format 'prefix:localPart'. If the QName has no prefix, then
the rawname will be the same as the QName's localPart. QName also stores
the uri information but as an identifier and not a string. You need to
convert the string value of the uri to an id. Currently, that
information is internal to the scanner (fURIStringPool). Straighforward,
isn't it :)?

Khaled

"Peter A. Volchek" wrote:

> To: Xerces team Guys, can you provide me with the quick help, what is
> a FullName format of a QName?The different comments in your code say
> different things.For example: File: SchemaElementDecl.hpp     //
> fSubstitutionGroupName
>     //      The substitution group full name
> ("uristring','local")File: XMLElementDecl.hpp     /** Get the full
> name of this element type.
>       *
>       * Return the full name of the element. If namespaces
>       * are not enabled, then this is the qName. Else it is the
> {uri}baseName
>       * form. For those validators that always require namespace
> processing, it
>       * will always be in the latter form because namespace processing
> will always
>       * be on.
>       */
>     const XMLCh* getFullName() const; The task I need is to find the
> SchemaElementDecl coresponding to the SubstitutionGroupName returning
> valueXMLCh* getSubstitutionGroupName() const; I need to extract the
> uri from the returning value to be able to find the required
> element.But I need to know the exact format of this value 1 or 2.1.
> ("uristring','local")2. {uri}baseName   - ( is uri represent the
> identifier (uriId) or string ) Thanks,Peter