W3C home > Mailing lists > Public > www-forms@w3.org > May 2009

Re: question about embedded instance vs. ref to an xml file

From: Mark Birbeck <mark.birbeck@webbackplane.com>
Date: Thu, 21 May 2009 08:56:30 +0100
Message-ID: <ed77aa9f0905210056l43136b97t2cc5139701d741d5@mail.gmail.com>
To: "Howard, Chris" <HowardC@prpa.org>
Cc: John Boyer <boyerj@ca.ibm.com>, www-forms@w3.org
Hi Chris,

Sorry that I didn't spot this thread earlier so I'm coming late to this.

I see that you've managed to work around this, but if you get the
problem again, send the two versions of your form, and we can take a
look.

John's suggestion sounds the most likely explanation to me, though,
since loading an external document means that it will get its own set
of namespaces that are completely independent of those of the host
document.

Another small point in passing, if you don't use something like
Fiddler, then I would recommend it. The mime type possibility you
mention would then be very quick to spot.

Regards,

Mark

On Wed, May 20, 2009 at 7:47 PM, Howard, Chris <HowardC@prpa.org> wrote:
> I never did figure out what the problem was, but I got around
> it by creating a temporary file which contains the inline
> instance data as well as the Xforms elements.
>
> I suspect I wasn't serving the file up using the right mime type or something
> when I was doing it dynamically.
>
> So, in the end I don't think it was a problem with inline
> vs referenced data.
>
>
>
> ________________________________
>
> From: John Boyer [mailto:boyerj@ca.ibm.com]
> Sent: Tue 5/12/2009 5:25 PM
> To: Howard, Chris
> Cc: www-forms@w3.org
> Subject: Re: question about embedded instance vs. ref to an xml file
>
>
>
> Hard to tell without seeing exact content here.
>
> If you have external data that stops working when you put it inline, then my first guess would be to ask if you are sure the namespace context set correctly?
>
> If you have external XML, it starts with a default namespace of xmlns="" whether or not you declare it in the data.  So if you *don't* include xmlns="" in the data, then the unqualified element names take xmlns="" as the default when the data is standalone, but they will take whatever default namespace is inherited from the document when you put the content inline.
>
> Less likely, but a possibility would be to ask whether the XML contains any leading XMLDecl content, like a DTD.  The XML grammar allows certain content at the beginning of an XML file that cannot be placed into the content of an XML element.
>
> Hope this helps.
>
> John M. Boyer, Ph.D.
> STSM, Interactive Documents and Web 2.0 Applications
> Chair, W3C Forms Working Group
> Workplace, Portal and Collaboration Software
> IBM Victoria Software Lab
> E-Mail: boyerj@ca.ibm.com
>
> Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer <http://www.ibm.com/developerworks/blogs/page/JohnBoyer>
> Blog RSS feed: http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw <http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw>
>
>
>
>
>
> From:   "Howard, Chris" <HowardC@prpa.org>
> To:     <www-forms@w3.org>
> Date:   05/12/2009 03:01 PM
> Subject:        question about embedded instance vs. ref to an xml file
>
> ________________________________
>
>
>
>
>
> Hi forms experts.
>
> I've run into a little problem.
>
> I have an xforms file which I can serve up to myself using
> apache on one of my unix servers.  It is set up to use
> formsPlayer on the client side.  And that is all working fine.
>
> In that setup I'm using an instance reference to an xml file
> which is also serveable from the same server.
>
>
> Now I'm trying to apply that form to some xml files of the
> same schema.  But these files are not servable through
> apache.
>
> So my plan was to use a perl-cgi script and a placeholder
> in the xform text.  I open the file requested,  I send out
> the first part of my xform, then the guts of the file
> as an inline instance definition, then the rest of the xform.
>
> To test that, I'm taking the cgi script output and
> serving that up to myself as a file.  And it's different.
>
> Part of the form in the middle of everything isn't displaying.
> I've looked it over multiple times, and I don't see
> anything wrong with my tags.
>
> The bottom line is that it seems to work differently
> when using an in-line instance definition than it
> does with a referenced xml file.
>
> I'm hoping maybe someone can tell me what to look for.
> Maybe there is some kind of encoding that I need to do
> to my inline instance data?  I don't know.
>
> Chris Howard
> howardc@prpa.org
>
>
>
>
>
>
>
>
>



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)
Received on Thursday, 21 May 2009 07:57:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:16 GMT