Re: ACTION-233: Update quality issue example to use the solution (XML in "script" tag) for standoff markup

On 9.10.2012 5:02, Yves Savourel wrote:

> I've tried to implement the global rules in <script> as we discussed.

Brave man!

> It is certainly looking like a hack, and I think to make it really work we'll have to have a few processing expectations. For example:
> 
> -- 1) As already mentioned: the type of the script would be set to the ITS MIME Type (application/its+xml)

Yes, but we should test if this works in all browsers. Some might try to
execute JS code inside <script> if MIME type is not recognized. All
browsers should recognize application/xml though.

> -- 2) There should be only one root element in the script. That is we shouldn't have two <its:rules> element one after the other. It's too complicated to deal with more.
> So if one wanted to have several its:rules, just use several <script> element.
> Same for the stand-off localization quality issue (if we end up using that hack for that too).

+1

> -- 3) Someone very smart should come up with a description of how exactly the ITS markup MUST be encapsulated in the script content, so:
>  a) it respects the restriction for content of script (http://dev.w3.org/html5/spec/single-page.html#restrictions-for-contents-of-script-elements)
>  b) ITS tools can obtain the XML string out of that content in a unique and simple way.
> 
> I'm using comments to encapsulate the code for now, instead of escaping the content. I think this is where we need to have a single way to do things.

I don't undestand why you are using comments? Why not just do

<script type="application/its+xml">
<its:rules version="2.0" xmlns:its="http://www.w3.org/2005/11/its"
  xmlns:h="http://www.w3.org/1999/xhtml">
 <its:translateRule translate="no" selector="//h:code"/>
</its:rules>
</script>

The only limitaion is that you can't use </script>, otherwise you can
use any markup without any escaping. Content of script element will
parse a single text node on which you must invoke XML parsing yourself.

> For the localization quality issues (if we use ,script> for that). I assume we could set the id of the script to the same id value defined in the <its:locQualityIssues> element, that way, the element referring to the stand-off markup could point directly to the proper script element.

Probably yes to using id on the script element. But we have to be
carefully here. On XHTML you will get duplicate IDs then, we need to
write down some guidelines.

     Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Received on Tuesday, 9 October 2012 11:06:20 UTC