首页 \ 问答 \ 如何将xsd.exe与包含冒号的属性一起使用?(How to use xsd.exe with an attribute that contains a colon? (xml:lang))

如何将xsd.exe与包含冒号的属性一起使用?(How to use xsd.exe with an attribute that contains a colon? (xml:lang))

我收到这条消息:

在这里输入图像描述

确实有两个元素(lsource和gloss)可以包含一个名为xml:lang的属性。

这里是xsd:

<? xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="JMdict_e.dtd" xmlns:wmh="http://www.wmhelp.com/2003/eGenerator" elementFormDefault="qualified" targetNamespace="JMdict_e.dtd">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
  <xs:element name = "JMdict" >
    < xs:complexType>
      <xs:sequence>
        <xs:element ref="entry" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "entry" >
    < xs:annotation>
      <xs:documentation>                                                                   </xs:documentation>
      <xs:documentation> This element records the information about the source

    language(s) of a loan-word/gairaigo.If the source language is other
   than English, the language is indicated by the xml:lang attribute.
   The element value (if any) is the source word or phrase.
    </xs:documentation>
      <xs:documentation> The xml:lang attribute defines the language(s) from which

    a loanword is drawn.It will be coded using the three-letter language

    code from the ISO 639-2 standard.When absent, the value "eng" (i.e.
   English) is the default value.The bibliographic(B) codes are used. </xs:documentation>
      <xs:documentation> The ls_type attribute indicates whether the lsource element

    fully or partially describes the source word or phrase of the
    loanword.If absent, it will have the implied value of "full".

    Otherwise it will contain "part".  </xs:documentation>
      <xs:documentation> Within each sense will be one or more "glosses", i.e.
    target-language words or phrases which are equivalents to the
    Japanese word.This element would normally be present, however it

    may be omitted in entries which are purely for a cross-reference.
    </xs:documentation>
      <xs:documentation> The xml:lang attribute defines the target language of the

    gloss.It will be coded using the three-letter language code from

    the ISO 639 standard.When absent, the value "eng" (i.e.English)
    is the default value. </xs:documentation>
      <xs:documentation> The sense-information elements provided for additional
    information to be recorded about a sense.Typical usage would

    be to indicate such things as level of currency of a sense, the
    regional variations, etc.
    </xs:documentation>
      <xs:documentation> The following entity codes are used for common elements within the
various information fields.
</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "ent_seq" />
        < xs:element ref= "k_ele" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "r_ele" maxOccurs= "unbounded" />
        < xs:element ref= "sense" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "ent_seq" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> Entries consist of kanji elements, reading elements,
    general information and sense elements.Each entry must have at
    least one reading element and one sense element.Others are optional.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "k_ele" >
    < xs:annotation>
      <xs:documentation> A unique numeric sequence number for each entry
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "keb" />
        < xs:element ref= "ke_inf" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "ke_pri" minOccurs= "0" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "keb" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> The kanji element, or in its absence, the reading element, is

    the defining component of each entry.

    The overwhelming majority of entries will have a single kanji

    element associated with a word in Japanese.Where there are
    multiple kanji elements within an entry, they will be orthographical

    variants of the same word, either using variations in okurigana, or
    alternative and equivalent kanji.Common "mis-spellings" may be

    included, provided they are associated with appropriate information
    fields.Synonyms are not included; they may be indicated in the

    cross-reference field associated with the sense element.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ke_inf" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element will contain a word or short phrase in Japanese

    which is written using at least one non-kana character(usually kanji,
    but can be other characters). The valid characters are

    kanji, kana, related characters such as chouon and kurikaeshi, and
    in exceptional cases, letters from other alphabets.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ke_pri" type="xs:string">
    <xs:annotation>
      <xs:documentation> This is a coded information field related specifically to the

    orthography of the keb, and will typically indicate some unusual
    aspect, such as okurigana irregularity.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "r_ele" >
    < xs:annotation>
      <xs:documentation> This and the equivalent re_pri field are provided to record

    information about the relative priority of the entry, and consist

    of codes indicating the word appears in various references which
    can be taken as an indication of the frequency with which the word
    is used.This field is intended for use either by applications which
    want to concentrate on entries of a particular priority, or to

    generate subset files.
    The current values in this field are:
    - news1/2: appears in the "wordfreq" file compiled by Alexandre Girardi
    from the Mainichi Shimbun. (See the Monash ftp archive for a copy.)

    Words in the first 12,000 in that file are marked "news1" and words
    in the second 12,000 are marked "news2".
    - ichi1/2: appears in the "Ichimango goi bunruishuu", Senmon Kyouiku

    Publishing, Tokyo, 1998.  (The entries marked "ichi2" were
    demoted from ichi1 because they were observed to have low
    frequencies in the WWW and newspapers.)
    - spec1 and spec2: a small number of words use this marker when they
    are detected as being common, but are not included in other lists.
    - gai1/2: common loanwords, based on the wordfreq file.
    - nfxx: this is an indicator of frequency-of-use ranking in the
    wordfreq file. "xx" is the number of the set of 500 words in which
    the entry can be found, with "01" assigned to the first 500, "02"

    to the second, and so on. (The entries with news1, ichi1, spec1, spec2
    and gai1 values are marked with a "(P)" in the EDICT and EDICT2

    files.)

    The reason both the kanji and reading elements are tagged is because
    on occasions a priority is only associated with a particular
    kanji/reading pair.
    </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="reb"/>
        <xs:element ref="re_nokanji" minOccurs="0"/>
        <xs:element ref="re_restr" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_inf" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_pri" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="reb" type="xs:string">
    <xs:annotation>
      <xs:documentation> The reading element typically contains the valid readings
    of the word(s) in the kanji element using modern kanadzukai.
    Where there are multiple reading elements, they will typically be
    alternative readings of the kanji element.In the absence of a
   kanji element, i.e. in the case of a word or phrase written

    entirely in kana, these elements will define the entry.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_nokanji" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> this element content is restricted to kana and related
    characters such as chouon and kurikaeshi.Kana usage will be

    consistent between the keb and reb elements; e.g. if the keb

    contains katakana, so too will the reb.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_restr" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element, which will usually have a null value, indicates
    that the reb, while associated with the keb, cannot be regarded
    as a true reading of the kanji. It is typically used for words
    such as foreign place names, gairaigo which can be in kanji or

    katakana, etc.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_inf" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element is used to indicate when the reading only applies

    to a subset of the keb elements in the entry. In its absence, all
    readings apply to all kanji elements.The contents of this element
    must exactly match those of one of the keb elements.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_pri" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> General coded information pertaining to the specific reading.

    Typically it will be used to indicate some unusual aspect of
    the reading. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "sense" >
    < xs:annotation>
      <xs:documentation> See the comment on ke_pri above. </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "stagk" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "stagr" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "pos" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "xref" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "ant" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "field" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "misc" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "s_inf" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "lsource" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "dial" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "gloss" minOccurs= "0" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "stagk" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> The sense element will record the translational equivalent

    of the Japanese word, plus other related information. Where there

    are several distinctly different meanings of the word, multiple
    sense elements will be employed.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "stagr" type= "xs:string" />
  < xs:element name = "xref" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> These elements, if present, indicate that the sense is restricted
    to the lexeme represented by the keb and/or reb. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ant" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element is used to indicate a cross-reference to another
    entry with a similar or related meaning or sense. The content of

    this element is typically a keb or reb element in another entry. In some

    cases a keb will be followed by a reb and/or a sense number to provide

    a precise target for the cross-reference.Where this happens, a JIS
    "centre-dot" (0x2126) is placed between the components of the

    cross-reference.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "pos" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element is used to indicate another entry which is an
    antonym of the current entry/sense.The content of this element
   must exactly match that of a keb or reb element in another entry.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "field" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> Part-of-speech information about the entry/sense.Should use

   appropriate entity codes.In general where there are multiple senses

   in an entry, the part-of-speech of an earlier sense will apply to

   later senses unless there is a new part-of-speech indicated.

   </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "misc" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> Information about the field of application of the entry/sense.
   When absent, general application is implied.Entity coding for

   specific fields of application. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "lsource" >

   < xs:annotation>
      <xs:documentation> This element is used for other relevant information about

   the entry/sense.As with part-of-speech, information will usually
   apply to several senses.
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name = "xml:lang" type= "xs:string" default="eng"/>
          <xs:attribute name = "ls_type" type= "xs:string" />

         < xs:attribute name = "ls_wasei" type= "xs:string" />

       </ xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name = "dial" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> The ls_wasei attribute indicates that the Japanese word

   has been constructed from words in the source language, and
   not from an actual phrase in that language. Most commonly used to

   indicate "waseieigo". </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "gloss" >

   < xs:annotation>
      <xs:documentation> For words specifically associated with regional dialects in
   Japanese, the entity code for that dialect, e.g.ksb for Kansaiben.
    </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed = "true" >

     < xs:choice minOccurs = "0" maxOccurs= "unbounded" >

       < xs:element ref= "pri" />

     </ xs:choice>
      <xs:attribute name = "xml:lang" type= "xs:string" default="eng"/>
      <xs:attribute name = "g_gend" type= "xs:string" />

   </ xs:complexType>
  </xs:element>
  <xs:element name = "pri" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> The g_gend attribute defines the gender of the gloss (typically
   a noun in the target language.When absent, the gender is either
   not relevant or has yet to be provided.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "s_inf" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> These elements highlight particular target-language words which
   are strongly associated with the Japanese word. The purpose is to
   establish a set of target-language words which can effectively be

   used as head-words in a reverse target-language/Japanese relationship.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>

I get this message:

enter image description here

There are indeed 2 elements (lsource and gloss) that can contain an attribute named xml:lang.

Here is the xsd:

<? xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="JMdict_e.dtd" xmlns:wmh="http://www.wmhelp.com/2003/eGenerator" elementFormDefault="qualified" targetNamespace="JMdict_e.dtd">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
  <xs:element name = "JMdict" >
    < xs:complexType>
      <xs:sequence>
        <xs:element ref="entry" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "entry" >
    < xs:annotation>
      <xs:documentation>                                                                   </xs:documentation>
      <xs:documentation> This element records the information about the source

    language(s) of a loan-word/gairaigo.If the source language is other
   than English, the language is indicated by the xml:lang attribute.
   The element value (if any) is the source word or phrase.
    </xs:documentation>
      <xs:documentation> The xml:lang attribute defines the language(s) from which

    a loanword is drawn.It will be coded using the three-letter language

    code from the ISO 639-2 standard.When absent, the value "eng" (i.e.
   English) is the default value.The bibliographic(B) codes are used. </xs:documentation>
      <xs:documentation> The ls_type attribute indicates whether the lsource element

    fully or partially describes the source word or phrase of the
    loanword.If absent, it will have the implied value of "full".

    Otherwise it will contain "part".  </xs:documentation>
      <xs:documentation> Within each sense will be one or more "glosses", i.e.
    target-language words or phrases which are equivalents to the
    Japanese word.This element would normally be present, however it

    may be omitted in entries which are purely for a cross-reference.
    </xs:documentation>
      <xs:documentation> The xml:lang attribute defines the target language of the

    gloss.It will be coded using the three-letter language code from

    the ISO 639 standard.When absent, the value "eng" (i.e.English)
    is the default value. </xs:documentation>
      <xs:documentation> The sense-information elements provided for additional
    information to be recorded about a sense.Typical usage would

    be to indicate such things as level of currency of a sense, the
    regional variations, etc.
    </xs:documentation>
      <xs:documentation> The following entity codes are used for common elements within the
various information fields.
</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "ent_seq" />
        < xs:element ref= "k_ele" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "r_ele" maxOccurs= "unbounded" />
        < xs:element ref= "sense" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "ent_seq" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> Entries consist of kanji elements, reading elements,
    general information and sense elements.Each entry must have at
    least one reading element and one sense element.Others are optional.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "k_ele" >
    < xs:annotation>
      <xs:documentation> A unique numeric sequence number for each entry
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "keb" />
        < xs:element ref= "ke_inf" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "ke_pri" minOccurs= "0" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "keb" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> The kanji element, or in its absence, the reading element, is

    the defining component of each entry.

    The overwhelming majority of entries will have a single kanji

    element associated with a word in Japanese.Where there are
    multiple kanji elements within an entry, they will be orthographical

    variants of the same word, either using variations in okurigana, or
    alternative and equivalent kanji.Common "mis-spellings" may be

    included, provided they are associated with appropriate information
    fields.Synonyms are not included; they may be indicated in the

    cross-reference field associated with the sense element.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ke_inf" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element will contain a word or short phrase in Japanese

    which is written using at least one non-kana character(usually kanji,
    but can be other characters). The valid characters are

    kanji, kana, related characters such as chouon and kurikaeshi, and
    in exceptional cases, letters from other alphabets.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ke_pri" type="xs:string">
    <xs:annotation>
      <xs:documentation> This is a coded information field related specifically to the

    orthography of the keb, and will typically indicate some unusual
    aspect, such as okurigana irregularity.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "r_ele" >
    < xs:annotation>
      <xs:documentation> This and the equivalent re_pri field are provided to record

    information about the relative priority of the entry, and consist

    of codes indicating the word appears in various references which
    can be taken as an indication of the frequency with which the word
    is used.This field is intended for use either by applications which
    want to concentrate on entries of a particular priority, or to

    generate subset files.
    The current values in this field are:
    - news1/2: appears in the "wordfreq" file compiled by Alexandre Girardi
    from the Mainichi Shimbun. (See the Monash ftp archive for a copy.)

    Words in the first 12,000 in that file are marked "news1" and words
    in the second 12,000 are marked "news2".
    - ichi1/2: appears in the "Ichimango goi bunruishuu", Senmon Kyouiku

    Publishing, Tokyo, 1998.  (The entries marked "ichi2" were
    demoted from ichi1 because they were observed to have low
    frequencies in the WWW and newspapers.)
    - spec1 and spec2: a small number of words use this marker when they
    are detected as being common, but are not included in other lists.
    - gai1/2: common loanwords, based on the wordfreq file.
    - nfxx: this is an indicator of frequency-of-use ranking in the
    wordfreq file. "xx" is the number of the set of 500 words in which
    the entry can be found, with "01" assigned to the first 500, "02"

    to the second, and so on. (The entries with news1, ichi1, spec1, spec2
    and gai1 values are marked with a "(P)" in the EDICT and EDICT2

    files.)

    The reason both the kanji and reading elements are tagged is because
    on occasions a priority is only associated with a particular
    kanji/reading pair.
    </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="reb"/>
        <xs:element ref="re_nokanji" minOccurs="0"/>
        <xs:element ref="re_restr" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_inf" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_pri" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="reb" type="xs:string">
    <xs:annotation>
      <xs:documentation> The reading element typically contains the valid readings
    of the word(s) in the kanji element using modern kanadzukai.
    Where there are multiple reading elements, they will typically be
    alternative readings of the kanji element.In the absence of a
   kanji element, i.e. in the case of a word or phrase written

    entirely in kana, these elements will define the entry.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_nokanji" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> this element content is restricted to kana and related
    characters such as chouon and kurikaeshi.Kana usage will be

    consistent between the keb and reb elements; e.g. if the keb

    contains katakana, so too will the reb.

    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_restr" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element, which will usually have a null value, indicates
    that the reb, while associated with the keb, cannot be regarded
    as a true reading of the kanji. It is typically used for words
    such as foreign place names, gairaigo which can be in kanji or

    katakana, etc.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_inf" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element is used to indicate when the reading only applies

    to a subset of the keb elements in the entry. In its absence, all
    readings apply to all kanji elements.The contents of this element
    must exactly match those of one of the keb elements.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "re_pri" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> General coded information pertaining to the specific reading.

    Typically it will be used to indicate some unusual aspect of
    the reading. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "sense" >
    < xs:annotation>
      <xs:documentation> See the comment on ke_pri above. </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref= "stagk" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "stagr" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "pos" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "xref" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "ant" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "field" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "misc" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "s_inf" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "lsource" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "dial" minOccurs= "0" maxOccurs= "unbounded" />
        < xs:element ref= "gloss" minOccurs= "0" maxOccurs= "unbounded" />
      </ xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name = "stagk" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> The sense element will record the translational equivalent

    of the Japanese word, plus other related information. Where there

    are several distinctly different meanings of the word, multiple
    sense elements will be employed.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "stagr" type= "xs:string" />
  < xs:element name = "xref" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> These elements, if present, indicate that the sense is restricted
    to the lexeme represented by the keb and/or reb. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "ant" type= "xs:string" >
    < xs:annotation>
      <xs:documentation> This element is used to indicate a cross-reference to another
    entry with a similar or related meaning or sense. The content of

    this element is typically a keb or reb element in another entry. In some

    cases a keb will be followed by a reb and/or a sense number to provide

    a precise target for the cross-reference.Where this happens, a JIS
    "centre-dot" (0x2126) is placed between the components of the

    cross-reference.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "pos" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element is used to indicate another entry which is an
    antonym of the current entry/sense.The content of this element
   must exactly match that of a keb or reb element in another entry.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "field" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> Part-of-speech information about the entry/sense.Should use

   appropriate entity codes.In general where there are multiple senses

   in an entry, the part-of-speech of an earlier sense will apply to

   later senses unless there is a new part-of-speech indicated.

   </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "misc" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> Information about the field of application of the entry/sense.
   When absent, general application is implied.Entity coding for

   specific fields of application. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "lsource" >

   < xs:annotation>
      <xs:documentation> This element is used for other relevant information about

   the entry/sense.As with part-of-speech, information will usually
   apply to several senses.
    </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name = "xml:lang" type= "xs:string" default="eng"/>
          <xs:attribute name = "ls_type" type= "xs:string" />

         < xs:attribute name = "ls_wasei" type= "xs:string" />

       </ xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name = "dial" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> The ls_wasei attribute indicates that the Japanese word

   has been constructed from words in the source language, and
   not from an actual phrase in that language. Most commonly used to

   indicate "waseieigo". </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "gloss" >

   < xs:annotation>
      <xs:documentation> For words specifically associated with regional dialects in
   Japanese, the entity code for that dialect, e.g.ksb for Kansaiben.
    </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed = "true" >

     < xs:choice minOccurs = "0" maxOccurs= "unbounded" >

       < xs:element ref= "pri" />

     </ xs:choice>
      <xs:attribute name = "xml:lang" type= "xs:string" default="eng"/>
      <xs:attribute name = "g_gend" type= "xs:string" />

   </ xs:complexType>
  </xs:element>
  <xs:element name = "pri" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> The g_gend attribute defines the gender of the gloss (typically
   a noun in the target language.When absent, the gender is either
   not relevant or has yet to be provided.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name = "s_inf" type= "xs:string" >

   < xs:annotation>
      <xs:documentation> These elements highlight particular target-language words which
   are strongly associated with the Japanese word. The purpose is to
   establish a set of target-language words which can effectively be

   used as head-words in a reverse target-language/Japanese relationship.
    </xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>

原文:https://stackoverflow.com/questions/47864884
更新时间:2023-08-03 15:08

最满意答案

所有旋转将围绕原点旋转。 所以你翻译成原点,旋转,然后翻译回来。

T = translate from global coordinates to user-coordinates
R = rotate around the origin (like in your link)
(T^-1) = translate back
point X

X_rotated = (T^-1)*R*T*X 

如果您有多个点旋转,则将矩阵相乘:

A = (T^-1)*R*T
X_rotated = A*X

All rotations will go around the origin. So you translate to the origin, rotate, then translate back.

T = translate from global coordinates to user-coordinates
R = rotate around the origin (like in your link)
(T^-1) = translate back
point X

X_rotated = (T^-1)*R*T*X 

If you have multiple points to rotate then multiply the matrices together:

A = (T^-1)*R*T
X_rotated = A*X

相关问答

更多
  • 我认为你正在寻求解决的一般问题是如何旋转3d中的对象。 根据我的理解,你知道如何获得相机矢量的大小,但不知道它们的方向。 您可以对要应用于相机的[上],[侧]和[查看/查看]向量的x,y和z轴定义角旋转。 上面的图片说明了我的意思是上,侧面和lookAt向量。 它们与您的圆锥体相关,如下图所示。 以下是C ++中的一些粗略代码,它将旋转一个给定轴和角度的点: Vec3 RotatedBy(Vec3 const &axisVec, double angleDegCCW) { i ...
  • 所有旋转将围绕原点旋转。 所以你翻译成原点,旋转,然后翻译回来。 T = translate from global coordinates to user-coordinates R = rotate around the origin (like in your link) (T^-1) = translate back point X X_rotated = (T^-1)*R*T*X 如果您有多个点旋转,则将矩阵相乘: A = (T^-1)*R*T X_rotated = A*X All ro ...
  • 重现你的第一个情节 library(rgl) x=2 y=3 z=1 plot3d(x, y, z, col = rainbow(1000), xlim = c(-4,4), ylim = c(-4, 4), zlim = c(-2, 2)) abclines3d(2, 3, 1, a = diag(3), col = "gray") To reproduce your first plot library(rgl) x=2 y=3 z=1 plot3d(x, y, z, col = rainbow(10 ...
  • 提供关于我已经在pcl用户论坛上给出的答案的更多见解。 看看Hinsterstoisser等人在重度混乱场景中基于模型的训练,检测和姿势估计中无纹理3D对象的方程1和方程2。 俗称LineMOD。 这是刚性物体姿态估计问题常用的方法。 公式1适用于非对称对象,2适用于对称对象。 我无法输入表达式,因为Stack Overflow不支持mathjax,但总体思路是: 您的点的估计位置与实际位置之间的差异的规范,对所有点进行求和,并按点数归一化 第一个区别在于你不再强制你点对应。 源云中的每个点选择目标云上最近 ...
  • 一种可能性是包括一个垂直于圆所在平面的矢量。 这样做的好处是,如果您决定渲染圆,则法线将用于确定诸如由该圆定义的曲面的反射之类的事物。 One possibility would be to include a vector that's normal to the plane on which the circle lies. This has the advantage that if you ever decide to render the circle, the normal will be us ...
  • 总结我上面的评论: http://en.wikipedia.org/wiki/Rotation_matrix http://en.wikipedia.org/wiki/3D_projection http://en.wikipedia.org/wiki/Viewing_frustum Summarizing my comments above: http://en.wikipedia.org/wiki/Rotation_matrix http://en.wikipedia.org/wiki/3D_proje ...
  • 您应该将点坐标与全旋转矩阵相乘,即matRotationTotal = matRotationX * matRotationY * matRotationZ 。 查看这篇文章的细节。 You should multiply point coordinates to full rotation matrix, which is matRotationTotal = matRotationX * matRotationY * matRotationZ. Check this article for detail ...
  • 沿着dir方向的简单线性平移是不够的 - 你将最终得到平面上具有正常方向的椭圆的投影 ,即椭圆。 你可以: 使用四元数构造旋转矩阵,将生成的圆重新定向到dir 。 创建此四元数: https : //stackoverflow.com/a/1171995/8204776 将其转换为矩阵: https : //stackoverflow.com/a/1556470/8204776 要么 在pos处构造正交基 ,其中一个轴是dir 。 简单的方法: 检查X轴是否与dir平行 - 理想情况下, abs(dot(d ...
  • mathematica随时可以解决三点问题: p = Table[ RandomReal[{-1, 1}, {3}], {3}] r = RandomReal[{1, 2}, {3}] Reduce[Simplify[ Table[Norm[{x, y, z} - p[[i]]] == r[[i]] , {i, 3}], Assumptions -> {Element[x | y | z, Reals]}], {x, y, z}, Reals] 这通常会返回false因为随机球体通常不会有三 ...
  • 三维空间中从点A到B的距离计算如下: distance = sqrt((b.x-A.x)^2+(B.y-A.y)^2+(B.z-A.z)^2) 要找到最小值,你必须迭代你的积分。 让我们说candidates是你想要找到最近邻居的点数集。 Point邻居将是最接近四点a的点。 Point a = new Point(0,0,0); Point neighbor = null; int min = INTEGER.MAX_VALUE; for(Point p : candidates){ dist ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)