[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Access denied
Subject: Re: [xsl] Access denied From: Jen Jiang <zhenjiang14221@xxxxxxxxx> Date: Mon, 8 Nov 2004 09:07:34 -0800 (PST) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Access denied, Jen Jiang | Thread | [xsl] Transforming XML 'on-the-fly', Nick Roberts |
Re: [xsl] Access denied, Jen Jiang | Date | RE: [xsl] XSLT 1.0: Grouping Adjace, Joe Heidenreich |
Month |