OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binaries



Sandra,

I'm not really the one who should be answering this, but maybe if I say
something naive, someone who can give a real answer will chime in.

When you say mixing binary, do you mean

    (1) You will get spurts of binary and spurts of XML in arbitrary order?
    (2) You will have an XML document containing binary elements using a hex
encoding or some such?
    or (3) You will have a binary stream with XML documents buried in it?

If (2), there should be no problems with well-formedness. DTDs may or may
not be relevant, depending on the design of your application.

As an example of (2), without DTD, I might offer (ignoring namespaces):

<document>
  <person id="123" name="xLerb xBrek">
    <picture encoding="hexadecimal_bitmap">00 12 7A F3 3E 4B 2D EC 55 AA 65
6A<picture>
    <comment>
      This person has a very small, rather abstract face. Maybe she's a
gremlin?
    </comment>
    <more_data/>
  </person>
</document>

If (1) or (3), DTDs won't do a thing for you. XML standards can't tell you
anything about how to get at XML data or documents buried in something else.
Something like ASN.1 may be appropriate to your needs. (Al?)

Joel Rees
============================XML as Best Solution===
Joel Rees                          リース ジョエル
Media Fusion Co.,Ltd.  株式会社メディアフュージョン
Amagasaki  TEL 81-6-6415-2560    FAX 81-6-6415-2556
    Tokyo TEL 81-3-3516-2566   FAX 81-3-3516-2567
                       http://www.mediafusion.co.jp
---------------------------------------------------
                                         Programmer
===================================================

----- Original Message -----
From: "Sandra Carney" <scarney@endocardial.com>
To: "XML Development" <xml-dev@lists.xml.org>
Sent: Thursday, May 31, 2001 3:02 AM
Subject: binaries


> Hello,
>   One of my developers requested that I figure out a way to read
>   istream and ifstreams( C++ ).  I looked at the mail archives and
>   was able to put something together from that.  However, he is also
>   going to be mixing binary data with the xml stuff all in the same
>   file.  Yeesh!  Anyway, he wants to be able to throw this thing
>   into a stream and just have my code read the xml part.  He is also
>   one of the folks who doesn't think we need a DTD.  My question is :
>
>   (1) Does mixing the binary stuff in there put the file into the
>       category of not being well-formed?
>   (2) If (1) is true, is a DTD required for me to make the distinction?
> Regards,
> Sandra Carney
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org
>