以下 xml 片段使用 Oxygen XML 编辑器从 Xerces 引擎产生以下错误:
Unexpected element "codeblock". The content of the parent element type must match "(dl|div|lcInteractionBase2|lcTrueFalse2|lcSingleSelect2|lcMultipleSelect2|lcSequencing2|lcMatching2|lcHotspot2|lcOpenQuestion2|fig|imagemap|lcInteractionBase|lcTrueFalse|lcSingleSelect|lcMultipleSelect|lcSequencing|lcMatching|lcHotspot|lcOpenQuestion|image|lines|lq|note|lcInstructornote|lcInstructornote2|object|ol|p|pre|simpletable|sl|table|ul|boolean|cite|keyword|ph|b|i|line-through|overline|sup|sub|tt|u|q|term|text|tm|xref|state|data|sort-as|data-about|foreign|unknown|draft-comment|fn|indextermref|indexterm|required-cleanup)".
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE learningContent PUBLIC "-//OASIS//DTD DITA Learning Content//EN" "learningContent.dtd">
<learningContent id="oc4j_learning_task1">
<title>Task 1</title>
<shortdesc></shortdesc>
<learningContentbody></learningContentbody>
<task id="oc4j_task1">
<title>Task 1</title>
<shortdesc/>
<taskbody>
<context>
<p><b>Requirements</b></p>
</context>
<steps>
<step>
<cmd>Login with sftp in the production server</cmd>
</step>
<step>
<cmd>Download the whole directory OC4J10 in your local directory</cmd>
</step>
<step>
<cmd>Make sure the system is using the same JDK (currently 1.6.0_45) from Oracle</cmd>
</step>
<step>
<cmd>Change the following files in /OC4J10/j2ee/home/config</cmd>
<substeps id="substeps_vty_xh4_dw">
<substep>
<cmd>application.xml</cmd>
<info>the file should point to the WAR (or expanded) files in your local
machine where the application modules are located as in following
example:
<codeblock>foo
</codeblock>
</info>
</substep>
</substeps>
</step>
</steps>
</taskbody>
</task>
</learningContent>
我尝试将父元素放置为 div(如错误提示的那样?)但它也不起作用。
最佳答案
似乎 DITA 1.2 和 DITA 1.3 学习域 DTD 都不包含编程域模块,因此“学习内容”中的任何地方都不允许使用代码块。因此,Oxygen 在报告验证错误时只是遵循规范。因此,例如,如果您查看 DITA 任务的 shell DTD:“DITA-OT\dtd\technicalContent\dtd\task.dtd”,它在编程域内部引用(其中包含 codeblock 或 codeph 等元素),但学习 shell DTD “DITA-OT2.x\plugins\org.oasis-open.dita.v1_3\dtd\learning\dtd\learningContent.dt d”没有。 因此,您可能需要学习和培训 dtd 特化,其中还添加了 programmind 领域。
关于xml - 如何在 DITA 中显示任务内部的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37568751/
我试图在一个项目中使用rake,如果我把所有东西都放到Rakefile中,它会很大并且很难读取/找到东西,所以我试着将每个命名空间放在lib/rake中它自己的文件中,我添加了这个到我的rake文件的顶部:Dir['#{File.dirname(__FILE__)}/lib/rake/*.rake'].map{|f|requiref}它加载文件没问题,但没有任务。我现在只有一个.rake文件作为测试,名为“servers.rake”,它看起来像这样:namespace:serverdotask:testdoputs"test"endend所以当我运行rakeserver:testid时
出于纯粹的兴趣,我很好奇如何按顺序创建PI,而不是在过程结果之后生成数字,而是让数字在过程本身生成时显示。如果是这种情况,那么数字可以自行产生,我可以对以前看到的数字实现垃圾收集,从而创建一个无限系列。结果只是在Pi系列之后每秒生成一个数字。这是我通过互联网筛选的结果:这是流行的计算机友好算法,类机器算法:defarccot(x,unity)xpow=unity/xn=1sign=1sum=0loopdoterm=xpow/nbreakifterm==0sum+=sign*(xpow/n)xpow/=x*xn+=2sign=-signendsumenddefcalc_pi(digits
我得到了一个包含嵌套链接的表单。编辑时链接字段为空的问题。这是我的表格:Editingkategori{:action=>'update',:id=>@konkurrancer.id})do|f|%>'Trackingurl',:style=>'width:500;'%>'Editkonkurrence'%>|我的konkurrencer模型:has_one:link我的链接模型:classLink我的konkurrancer编辑操作:defedit@konkurrancer=Konkurrancer.find(params[:id])@konkurrancer.link_attrib
如何在buildr项目中使用Ruby?我在很多不同的项目中使用过Ruby、JRuby、Java和Clojure。我目前正在使用我的标准Ruby开发一个模拟应用程序,我想尝试使用Clojure后端(我确实喜欢功能代码)以及JRubygui和测试套件。我还可以看到在未来的不同项目中使用Scala作为后端。我想我要为我的项目尝试一下buildr(http://buildr.apache.org/),但我注意到buildr似乎没有设置为在项目中使用JRuby代码本身!这看起来有点傻,因为该工具旨在统一通用的JVM语言并且是在ruby中构建的。除了将输出的jar包含在一个独特的、仅限ruby
我正在使用的第三方API的文档状态:"[O]urAPIonlyacceptspaddedBase64encodedstrings."什么是“填充的Base64编码字符串”以及如何在Ruby中生成它们。下面的代码是我第一次尝试创建转换为Base64的JSON格式数据。xa=Base64.encode64(a.to_json) 最佳答案 他们说的padding其实就是Base64本身的一部分。它是末尾的“=”和“==”。Base64将3个字节的数据包编码为4个编码字符。所以如果你的输入数据有长度n和n%3=1=>"=="末尾用于填充n%
我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i
在rails源中:https://github.com/rails/rails/blob/master/activesupport/lib/active_support/lazy_load_hooks.rb可以看到以下内容@load_hooks=Hash.new{|h,k|h[k]=[]}在IRB中,它只是初始化一个空哈希。和做有什么区别@load_hooks=Hash.new 最佳答案 查看rubydocumentationforHashnew→new_hashclicktotogglesourcenew(obj)→new_has
我有一个对象has_many应呈现为xml的子对象。这不是问题。我的问题是我创建了一个Hash包含此数据,就像解析器需要它一样。但是rails自动将整个文件包含在.........我需要摆脱type="array"和我该如何处理?我没有在文档中找到任何内容。 最佳答案 我遇到了同样的问题;这是我的XML:我在用这个:entries.to_xml将散列数据转换为XML,但这会将条目的数据包装到中所以我修改了:entries.to_xml(root:"Contacts")但这仍然将转换后的XML包装在“联系人”中,将我的XML代码修改为
exe应该在我打开页面时运行。异步进程需要运行。有什么方法可以在ruby中使用两个参数异步运行exe吗?我已经尝试过ruby命令-system()、exec()但它正在等待过程完成。我需要用参数启动exe,无需等待进程完成是否有任何rubygems会支持我的问题? 最佳答案 您可以使用Process.spawn和Process.wait2:pid=Process.spawn'your.exe','--option'#Later...pid,status=Process.wait2pid您的程序将作为解释器的子进程执行。除
鉴于我有以下迁移:Sequel.migrationdoupdoalter_table:usersdoadd_column:is_admin,:default=>falseend#SequelrunsaDESCRIBEtablestatement,whenthemodelisloaded.#Atthispoint,itdoesnotknowthatusershaveais_adminflag.#Soitfails.@user=User.find(:email=>"admin@fancy-startup.example")@user.is_admin=true@user.save!ende