| |
---|
| | <!-- |
---|
| | Check whether there are actual paragraphs or things that |
---|
| | should be treated like paragraphs inside the item. If so, |
---|
| | let them worry about inserting the <P> tags. |
---|
| | |
---|
| | I've added include-document to the list to stop |
---|
| | included questions from having extra <p>'s wrapped |
---|
| | around them. This seems to work and should be a |
---|
| | sensible approach; since you can't predict what an |
---|
| | included document might do, it's safer to let it |
---|
| | worry about paragraphs. However, I'm not sure what |
---|
| | implications this decision might have in general. A |
---|
| | longer-term solution would be to move to something |
---|
| | that supports XInclude, but this is probably too new |
---|
| | yet? |
---|
| | --> |
---|
| | <xsl:when test="count(paragraph|para|p|question|answer|code-block) != 0"> |
---|
| | <xsl:when test="count(paragraph|para|p|question|answer|code-block|include-document) != 0"> |
---|
| | <LI><xsl:apply-templates/></LI> |
---|
| | </xsl:when> |
---|
| | <!-- |
---|
| | Otherwise, insert <P> tags surrounding the item content |
---|
| |
---|
| | <latex><xsl:apply-templates/></latex> |
---|
| | <html> |
---|
| | <xsl:choose> |
---|
| | <!-- |
---|
| | Check whether there are actual paragraphs inside the question. |
---|
| | If so, let them worry about inserting the <P> tags. |
---|
| | Check whether there are actual paragraphs inside the |
---|
| | question. If so, let them worry about inserting the |
---|
| | <P> tags. |
---|
| | |
---|
| | I've added include-document to the list to stop |
---|
| | included questions from having extra <p>'s wrapped |
---|
| | around them. This seems to work and should be a |
---|
| | sensible approach; since you can't predict what an |
---|
| | included document might do, it's safer to let it |
---|
| | worry about paragraphs. However, I'm not sure what |
---|
| | implications this decision might have in general. A |
---|
| | longer-term solution would be to move to something |
---|
| | that supports XInclude, but this is probably too new |
---|
| | yet? |
---|
| | --> |
---|
| | <xsl:when test="count(paragraph|para|p|question|answer|code-block) != 0"> |
---|
| | <xsl:when test="count(paragraph|para|p|question|answer|code-block|include-document) != 0"> |
---|
| | <xsl:apply-templates/> |
---|
| | </xsl:when> |
---|
| | <!-- |
---|
| | Otherwise, insert <P> tags surrounding the question content. |
---|
| |
---|
| | of \input{} in HTML, plus the XSLT processor always seems to |
---|
| | generate a DOCTYPE when producing HTML, whether you want it or |
---|
| | not, which means that you can only really include entire HTML |
---|
| | documents, rather than HTML fragments (maybe you can turn this |
---|
| | off?). The solution here is to embed the HTML document inside an |
---|
| | <OBJECT>. |
---|
| | off?). The workaround currently is to embed the HTML document |
---|
| | inside an <OBJECT>. |
---|
| | |
---|
| | A similar argument applies for plain text documents (such as |
---|
| | code listings) that we want to include, but are externally |
---|
| | generated and so can't just be embedded in the source XML. |
---|
| |
---|
| | "html" [default for HTML] |
---|
| | "latex" [default for LaTeX] |
---|
| | "text" |
---|
| | |
---|
| | @basename: Name of file to include. [required] |
---|
| | |
---|
| | @location: Path to file to include. [optional] |
---|
| | @basename: Name of file to include (including suffix!). |
---|
| | [required] |
---|
| | |
---|
| | @location: Path to file to include. Note that this gets a / |
---|
| | appended to it. However, this shouldn't make any difference in |
---|
| | normal usage. [optional] |
---|
| | --> |
---|
| | <template name="include-document" match="include-document"> |
---|
| | <common> |
---|
| | <!-- |
---|
| |
---|
|