|
|
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
Подскажите пожалуйста!!! Проблема: у меня есть XSLT-файл, в котором необходимо переносить значения из одних тегов в другие. Так вот иногда эти значения (получаемые с помощью value-of или copy-of) содержат строки типа "13"i&". Когда xsltproc пытается скопировать подобные строки, то выдает различные ошибки, типа "no name" или "expected ';'", при том, что мне ненадо обрабатывать эти строки, мне надо их просто скопировать. Я пыталась сделать замену этих символов конструкцией вида <xsl:copy-of select="translate(translate(.,'"',' '),'&','#32')"/> или <xsl:copy-of select="translate(translate(.,'"',' '),'&',' ')"/> но ни та, ни другая конструкция не проходит. Говорит, что не согласованный файл и т.п. Подскажите, что с этим можно сделать. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.03.2006, 16:59 |
|
||
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
Ключевое слово: disable-output-escaping ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 28.03.2006, 20:46 |
|
||
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
Не поняла. То есть где-то надо написать команду xsl:disable-output-escaping? Где и как? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2006, 11:27 |
|
||
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
SunAlexНе поняла. То есть где-то надо написать команду xsl:disable-output-escaping? Где и как? Да, команду нужно написать в yandex'е. Код: plaintext 1. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2006, 12:17 |
|
||
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
Все хорошо, только мне надо использовать xsl:copy-of или value-of, а там данная конструкция не работает, потому что такого атрибута для данной команды не :( ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 30.03.2006, 12:49 |
|
||
|
Как обработать '&' в XSLT-файле???
|
|||
|---|---|---|---|
|
#18+
SunAlexВсе хорошо, только мне надо использовать xsl:copy-of или value-of, а там данная конструкция не работает, потому что такого атрибута для данной команды не :( MSDN <xsl:value-of> Element Inserts the value of the selected node as text. <xsl:value-of select = Expression disable-output-escaping = "yes" | "no" </xsl:value-of> Attributes select Required. The expression to be evaluated against the current context. The results are converted to a string, as by a call to the string() function. A node-set is converted to a string by inserting the string value of the first node in the set. disable-output-escaping Default is "no". If the value is "yes", a text node generated by instantiating the <xsl:value-of> element will be output without any escaping. For example, the following generates the single character "<". <xsl:value-of disable-output-escaping="yes" select="string('<')"/> Note Because disable-output-escaping="yes" can be used to generate non-well-formed documents, it should be used with caution. Output that is not well-formed can generate errors in certain circumstances. For example, transformNodeToObject to an XML document requires that the result be well-formed, and thus might not complete if disable-output-escaping has affected the well-formedness of the document. Consider disable-output-escaping="yes" an advanced feature, to be used only when the potential dangers are understood. Про xsl:copy-of вы правы, там такой атрибут не поддерживается... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 01.04.2006, 00:38 |
|
||
|
|

start [/forum/topic.php?fid=14&fpage=75&tid=1334830]: |
0ms |
get settings: |
10ms |
get forum list: |
19ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
35ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
46ms |
get tp. blocked users: |
2ms |
| others: | 248ms |
| total: | 381ms |

| 0 / 0 |
