String Literal Type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • WJ

    #1

    String Literal Type

    I've been going through an Xml Schema book and googling for a bit on this
    and am having a hard time finding an answer.

    I'm looking for a datatype for my xsd file that will hold a string literal.
    The contents
    will be XML, but I don't want it interpreted. The reason is this is for an
    error handler.

    So the XML will look something like:

    <Error. . .>
    <Data>
    <ErrorMessage>Y ou have bad elements</ErrorMessage>
    <OriginalXml>
    <XML1></XML1>
    <XML2></XML2>
  • Priscilla Walmsley

    #2
    Re: String Literal Type

    Hi,

    You could use a wildcard to indicate that any content is acceptable.
    That is, the type for OriginalXML would look like:

    <xs:complexTy pe name="OriginalX MLType">
    <xs:sequence>
    <xs:any processContents ="skip" namespace="##an y" minOccurs="0"
    maxOccurs="unbo unded"/>
    </xs:sequence>
    </xs:complexType>

    Hope that helps,
    Priscilla

    -----------------------------------------------------
    Priscilla Walmsley
    Author, Definitive XML Schema (Prentice Hall PTR)
    http://www.datypic.com
    -----------------------------------------------------

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!

    Comment

    • WJ

      #3
      Re: String Literal Type

      This worked great. Thanks!


      Comment

      Working...