[prev in list] [next in list] [prev in thread] [next in thread]
List: horde-sync
Subject: Re: AW: [sync] Some Questions about WBXML / Encoding
From: Anthony Mills <amills () gascard ! net>
Date: 2003-12-16 15:40:41
Message-ID: 3FDF2779.70204 () gascard ! net
[Download RAW message or body]
Just return XML_WBXML_DTD and see if that works.
Anthony
Anton Hummel wrote:
> You are right
>
> but with a little change i thought it could be possible.
>
> My Idea
> 1. we define an default dtd (empty)
> 2. your code do Know how to handle Literal Tag, but while unknow or missing
> DTD the code breaks in an call to an unknown member call (imho is handled
> in
> the writetag function )
> 3. If we split the headerwrite and the datawrite and later concatenate
> it,this could be an solution so we could process most xml-files
>
> ----
>
> An other idea is to bild an Method encode_file($filename)
> example stolen from class_path_parser
> <!code-example>
> function parse_file($xml) {
> if (!($fp = fopen($xml, "r"))) {
> $this->error="Cannot open $rddl";
> return false;
> }
> while ($data = fread($fp, 4096)) {
> if (!xml_parse($this->parser, $data, feof($fp))) {
> $this->error="XML error:
> ".xml_error_string(xml_get_error_code($this->parser))." at line
> ".xml_get_current_line_number($this->parser);
> return false;
> }
> }
> xml_parser_free($this->parser);
> return true;
> }
> <!/code-example>
>
> this makes it possible to work on large file
>
> bye Anton
>
>
>>Possibly. But I don't think the code supports that type of encoding.
>>It expects DTD's.
>>
>>Anthony
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Anthony Mills [mailto:amills@gascard.net]
> Gesendet: Montag, 15. Dezember 2003 19:25
> An: Anton Hummel
> Cc: sync@lists.horde.org
> Betreff: Re: [sync] Some Questions about WBXML / Encoding
>
>
> Possibly. But I don't think the code supports that type of encoding.
> It expects DTD's.
>
> Anthony
>
> Anton Hummel wrote:
>
>>Hello
>>
>>after examin the WBXML Specs i have some Questions.
>>
>>Shouldn´t it be possible to encode an xml-file without DTD/DTD Public
>>Identifier by using
>>the LITERAL, LITERAL_A, LITERAL_C and LITERAL_AC (Global Token).
>>
>>I have found an Example at http://www.devx.com/xml/Article/16754/0/page/3
>
> !
>
>>listing 3 is the xml representation and listing 4 ist wbxml
>>
>>Any hints for encoding/decoding
>>
>>- Anton
>>
>>
>>
>>------------------------------------------------------------------------
>>
>>
>
>
>
>
>
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic