[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Access denied

Subject: Re: Access denied
From: Jen Jiang <zhenjiang14221@xxxxxxxxx>
Date: Mon, 8 Nov 2004 09:07:34 -0800 (PST)
xml access denied
My XML file is like:
<ROOT>
  <OBJECT>
     <RSSCHANNEL/>
  </OBJECT>
</ROOT>




Jen Jiang wrote:

>I kept getting "...Only one top level element is
>allowed in an XML document. Error processing
resource"
>even though I have checked many times that there is
>only one top level element which is <xsl:stylesheet>
>Can someone help? Here's the xslt file.
>  
>
The problem then is not with your XSL file but your
XML file...  I'm 
not 
sure what processor you are using but the "sound" of
the error is much 
more like that of what a XML parser will display when
parsing a badly 
formed XML document.   You need to reduce the number
of top level 
elements before your transformation will work... so,
for example, if 
your XML looks like this:

<?xml version="1.0" encoding="utf-8"?>
<elements>
    <element/>
</elements>
<elements>
    <element/>
</elements>

You would need to either add a top level "wrapper"
like this:

<?xml version="1.0" encoding="utf-8"?>
<elements>
    <elements>
        <element/>
    </elements>
    <elements>
        <element/>
    </elements>
</elements>

or, if possible to do without changing the structural
meaning of your 
document,  merge the "element" children into on
"elements" parent:

<?xml version="1.0" encoding="utf-8"?>
<elements>
    <element/>
    <element/>
</elements>

Of course I am speaking hypothetically and your XML
file obviously 
doesnt look like this....

Hope this helps!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.