Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: XML XInclude support
Date: Fri, 02 Feb 2007 18:53:00 -0000	[thread overview]
Message-ID: <usldo1jdf.fsf@gnu.org> (raw)
In-Reply-To: <20070129213229.GA17422@nevyn.them.org> (message from Daniel 	Jacobowitz on Mon, 29 Jan 2007 16:32:30 -0500)

> Date: Mon, 29 Jan 2007 16:32:30 -0500
> From: Daniel Jacobowitz <drow@false.org>
> Cc: Eli Zaretskii <eliz@gnu.org>
> 
> This patch adds support for a limited subset (I confess, very limited)
> of XInclude to GDB's target description parser.  It's a simple textual
> transform.  A file that looks like this:
> 
>   <target>
>     <xi:include href="other.xml"/>
>   </target>
> 
> is expanded to include the contents of other.xml instead of the
> xi:include element, before parsing it as a target description.
> For "set tdesc filename" other.xml should be in the same directory
> as the original description.  For qXfer:features, other.xml is
> a new annex to read from the target.

Thanks.

> +  /* Simple, portable version of dirname that does not modify its
> +     argument.  */
> +  base = lbasename (filename);
> +  while (base > filename && IS_DIR_SEPARATOR (base[-1]))
> +    --base;

I'm glad to see portable file-name handling, but this loop needs a
small extra to not fail in the case of "d:foo".

> +@example
> +<xi:include href="@var{name}"/>
> +@end example
> +
> +@noindent
> +When @value{GDBN} encounters an element of this form, it will retrieve
> +the XML document named @var{name}, and replace the inclusion directive
> +with the contents of that annex.

I'd suggest to use @var{document} instead of @var{name}, and reword
the last sentence like this:

  When @value{GDBN} encounters an element of this form, it will retrieve
  the named XML @var{document} ...

>                                    If the current description was read
> +using @samp{qXfer}, then the new document will be also

This "the new document will be also" is a bit confusing, I think.  How
about this instead:

  If the current description was read using @samp{qXfer}, then so will
  be the included @var{document}; the description's name will be
  interpreted as the name of an annex.

>                            If the current description was read from a
> +file, @value{GDBN} will look for a file named @var{name} in the same
> +directory as the original file.

                             If the current description was read from a
  file, @value{GDBN} will look for @var{document} as a file in the same
  directory where it found the original description.


  parent reply	other threads:[~2007-02-02 18:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 21:32 Daniel Jacobowitz
2007-01-31 18:33 ` Daniel Jacobowitz
2007-02-02 18:53 ` Eli Zaretskii [this message]
2007-02-06 12:49   ` Daniel Jacobowitz
2007-02-07 18:16     ` Eli Zaretskii
2007-02-07 18:37       ` Daniel Jacobowitz
2007-02-07 18:45         ` Daniel Jacobowitz
2007-02-07 22:49           ` Daniel Jacobowitz
2007-02-08 13:06             ` Mark Kettenis
2007-02-08 13:14               ` Daniel Jacobowitz
2007-02-08 16:15                 ` Mark Kettenis
2007-02-08 13:57                   ` Daniel Jacobowitz
2007-02-06 13:03   ` Daniel Jacobowitz
2007-02-07 18:20     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=usldo1jdf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox