Hi all,
I have a question about XSLT and I hope you can help me.
I have a XML file like that
<book>
<title>
Title here
</title>
<author>
Author name here
</author>
<content>
content here
</content>
</book>
<book>
<author>
Author name here
</author>
<content>
content here
</content>
</book>
<book>
<content>
content here
</content>
</book>
I want to extract title of these books, and ONLY IF there's no title then I'll extract the Author name. If there is neither title nor author then nothing is extracted.
With XSLT, I know how to extract title, or author, or both. However I don't know how to extract author only if there is no title. Can anyone help me?
I have a question about XSLT and I hope you can help me.
I have a XML file like that
<book>
<title>
Title here
</title>
<author>
Author name here
</author>
<content>
content here
</content>
</book>
<book>
<author>
Author name here
</author>
<content>
content here
</content>
</book>
<book>
<content>
content here
</content>
</book>
I want to extract title of these books, and ONLY IF there's no title then I'll extract the Author name. If there is neither title nor author then nothing is extracted.
With XSLT, I know how to extract title, or author, or both. However I don't know how to extract author only if there is no title. Can anyone help me?