| Author |
Top level XTF tag and XML pretty printing
|
|
| Jon Smirl 2005-10-24, 6:40 pm |
| With this input file...
<?xml version="1.0" ?>
<ns:mydoctag xmlns:ns="mynamespace"/>
mynamespace:mydoctag is implemented as an XTF component. The input XML
format does not use xml-stylesheet type stylesheets.
Currently my XTF implementation is returning an error on the creation of
the top level mydoctag element per the XTF readme. This results in a
generic XML element being created.
As far as I can tell there is no way to suppress XML pretty printing in
this case.
A fix for this could be to always suppress pretty printing if an XTF
component is top level, or add an attribute to top level XTF components to
control pretty printing. Is there some other way to suppress pretty
printing given that I can't change the input format to add an
xml-stylesheet PI?
--
Jon Smirl, jonsmirl@XXXXXXXXXX
| |
| Michael Vincent van Rantwijk 2005-10-24, 6:40 pm |
| Jon Smirl wrote:
> With this input file...
>
> <?xml version="1.0" ?>
> <ns:mydoctag xmlns:ns="mynamespace"/>
>
> mynamespace:mydoctag is implemented as an XTF component. The input XML
> format does not use xml-stylesheet type stylesheets.
>
> Currently my XTF implementation is returning an error on the creation of
> the top level mydoctag element per the XTF readme. This results in a
> generic XML element being created.
>
> As far as I can tell there is no way to suppress XML pretty printing in
> this case.
>
> A fix for this could be to always suppress pretty printing if an XTF
> component is top level, or add an attribute to top level XTF components to
> control pretty printing. Is there some other way to suppress pretty
> printing given that I can't change the input format to add an
> xml-stylesheet PI?
Have you tried to set/add "layout.xml.prettyprint" to true, does that help?
Michael
| |
| Jon Smirl 2005-10-24, 6:41 pm |
| On Mon, 24 Oct 2005 07:34:42 -0700, Michael Vincent van Rantwijk wrote:
> Jon Smirl wrote:
>
> Have you tried to set/add "layout.xml.prettyprint" to true, does that help?
Wouldn't that suppress pretty printing for all documents, not just my
special XTF ones? I don't want to change pretty print behavior for
anything except my special XTF documents.
>
> Michael
--
Jon Smirl, jonsmirl@XXXXXXXXXX
| |
| Jon Smirl 2005-10-24, 6:41 pm |
| The problem is that XML namespaces implemented by XTF components do not
necessarily use xml-stylesheet to implement styling. Since the
xml-stylesheet PI is missing from these pages Mozilla will pretty print
them instead of allowing the XTF components to display them.
I filed this as: https://bugzilla.mozilla.org/show_bug.cgi?id=313643
A patch adding the needed method is attached to the bug.
Jon Smirl, jonsmirl@XXXXXXXXXX
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |