[Resolved] Cannot add attributes to an element if children have been already added to the element.
This is an open discussion with no replies, filed under Troubleshooting.
Search
Create an account or sign in to comment.
This is an open discussion with no replies, filed under Troubleshooting.
Create an account or sign in to comment.
Quick Links
Symphony • Open Source XSLT CMS
--with-xsl
)
I have some code that helps produce the pagination for a blog I'm working on, but I'm getting an error I've never seen before, and I'm not entirely sure what it's trying to tell me. Anyone know how to get around it?
The error:
The code:
The error only triggers when the last
if
statement resolves as true - so I'm assuming the problem is adding twoattr
to the same element. However they're different attributes, and I'm not sure it would be possible to do the same thing any other way? Also the error doesn't actually say that, so who knows!Edit: As is often the case I noticed the problem as soon as I posted the question. The
otherwise
clause in thechoose
statement didn't contain theattribute
declaration, so that string was being output as thechild
, hence the error (which although still oddly worded, now makes perfect sense).